diff --git a/docs/framework/react/guides/query-cancellation.md b/docs/framework/react/guides/query-cancellation.md index 3e8545c0aa..efbf0eb351 100644 --- a/docs/framework/react/guides/query-cancellation.md +++ b/docs/framework/react/guides/query-cancellation.md @@ -187,3 +187,7 @@ return ( ``` [//]: # 'Example7' + +## Limitations + +Cancelation does not work when working with `Suspense` hooks: `useSuspenseQuery`, `useSuspenseQueries` and `useSuspenseInfiniteQuery`. diff --git a/docs/framework/react/reference/useSuspenseInfiniteQuery.md b/docs/framework/react/reference/useSuspenseInfiniteQuery.md index 06e81cbb23..0f69233d6d 100644 --- a/docs/framework/react/reference/useSuspenseInfiniteQuery.md +++ b/docs/framework/react/reference/useSuspenseInfiniteQuery.md @@ -24,3 +24,7 @@ Same object as [useInfiniteQuery](../useInfiniteQuery), except that: - `isPlaceholderData` is missing - `status` is always `success` - the derived flags are set accordingly. + +**Caveat** + +[Cancelation](../guides/query-cancellation.md) does not work. diff --git a/docs/framework/react/reference/useSuspenseQueries.md b/docs/framework/react/reference/useSuspenseQueries.md index 549bfe9022..7da4f3fb48 100644 --- a/docs/framework/react/reference/useSuspenseQueries.md +++ b/docs/framework/react/reference/useSuspenseQueries.md @@ -25,6 +25,8 @@ Same structure as [useQueries](../useQueries), except that for each `query`: - `status` is always `success` - the derived flags are set accordingly. -**Caveat** +**Caveats** Keep in mind that the component will only re-mount after **all queries** have finished loading. Hence, if a query has gone stale in the time it took for all the queries to complete, it will be fetched again at re-mount. To avoid this, make sure to set a high enough `staleTime`. + +[Cancelation](../guides/query-cancellation.md) does not work. diff --git a/docs/framework/react/reference/useSuspenseQuery.md b/docs/framework/react/reference/useSuspenseQuery.md index 7bb04f60e5..3c2ab660eb 100644 --- a/docs/framework/react/reference/useSuspenseQuery.md +++ b/docs/framework/react/reference/useSuspenseQuery.md @@ -23,3 +23,7 @@ Same object as [useQuery](../useQuery), except that: - `isPlaceholderData` is missing - `status` is always `success` - the derived flags are set accordingly. + +**Caveat** + +[Cancelation](../guides/query-cancellation.md) does not work.