From bab84e15f76ec4927a0657654f04c048fe8d7bd3 Mon Sep 17 00:00:00 2001 From: Dominik Dorfmeister Date: Wed, 8 Jan 2025 14:31:35 +0100 Subject: [PATCH] docs: reference --- docs/framework/react/reference/useQuery.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/framework/react/reference/useQuery.md b/docs/framework/react/reference/useQuery.md index 92ce54f237..3032287d90 100644 --- a/docs/framework/react/reference/useQuery.md +++ b/docs/framework/react/reference/useQuery.md @@ -53,6 +53,7 @@ const { select, staleTime, structuralSharing, + subscribed, throwOnError, }, queryClient, @@ -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