From 766abd9c1e741787a4e26e5816a4ba98ade38875 Mon Sep 17 00:00:00 2001 From: airman5573 Date: Sun, 17 Jul 2022 11:54:37 +0900 Subject: [PATCH] docs(useQuery): add an explanation of isDataEqual option --- docs/reference/useQuery.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reference/useQuery.md b/docs/reference/useQuery.md index 5cf03145de..e96a34308a 100644 --- a/docs/reference/useQuery.md +++ b/docs/reference/useQuery.md @@ -175,6 +175,9 @@ const result = useQuery({ - Optional - Defaults to `false` - If set, any previous `data` will be kept when fetching new data because the query key changed. +- `isDataEqual: (oldData: TData | undefined, newData: TData) => boolean` + - Optional + - This function should return boolean indicating whether to use previous `data` (`true`) or new data (`false`) as a resolved data for the query. - `structuralSharing: boolean` - Optional - Defaults to `true`