Skip to content

Commit b25e964

Browse files
authored
docs(useQuery): add an explanation of isDataEqual option (#3838)
1 parent d6cb962 commit b25e964

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/reference/useQuery.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ const result = useQuery({
175175
- Optional
176176
- Defaults to `false`
177177
- If set, any previous `data` will be kept when fetching new data because the query key changed.
178+
- `isDataEqual: (oldData: TData | undefined, newData: TData) => boolean`
179+
- Optional
180+
- This function should return boolean indicating whether to use previous `data` (`true`) or new data (`false`) as a resolved data for the query.
178181
- `structuralSharing: boolean`
179182
- Optional
180183
- Defaults to `true`

0 commit comments

Comments
 (0)