Skip to content

Commit

Permalink
docs: reference
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo committed Jan 8, 2025
1 parent 67ac48a commit bab84e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/framework/react/reference/useQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const {
select,
staleTime,
structuralSharing,
subscribed,
throwOnError,
},
queryClient,
Expand Down Expand Up @@ -161,6 +162,10 @@ const {
- Defaults to `true`
- If set to `false`, structural sharing between query results will be disabled.
- If set to a function, the old and new data values will be passed through this function, which should combine them into resolved data for the query. This way, you can retain references from the old data to improve performance even when that data contains non-serializable values.
- `subscribed: boolean`
- Optional
- Defaults to `true`
- If set to `false`, this instance of `useQuery` will not be subscribed to the cache. This means it won't trigger the `queryFn` on its own, and it won't receive updates if data gets into cache by other means.
- `throwOnError: undefined | boolean | (error: TError, query: Query) => boolean`
- Defaults to the global query config's `throwOnError` value, which is `undefined`
- Set this to `true` if you want errors to be thrown in the render phase and propagate to the nearest error boundary
Expand Down

0 comments on commit bab84e1

Please sign in to comment.