Skip to content

Commit 804357b

Browse files
romain-trotardTkDodoautofix-ci[bot]
authored
docs: Add known limitation about cancellation with suspense hooks (#7958)
* docs: Add known limitation about cancellation with suspense hooks * ci: apply automated fixes --------- Co-authored-by: Dominik Dorfmeister <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent d29997a commit 804357b

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

docs/framework/react/guides/query-cancellation.md

+4
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,7 @@ return (
187187
```
188188

189189
[//]: # 'Example7'
190+
191+
## Limitations
192+
193+
Cancelation does not work when working with `Suspense` hooks: `useSuspenseQuery`, `useSuspenseQueries` and `useSuspenseInfiniteQuery`.

docs/framework/react/reference/useSuspenseInfiniteQuery.md

+4
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ Same object as [useInfiniteQuery](../useInfiniteQuery), except that:
2424
- `isPlaceholderData` is missing
2525
- `status` is always `success`
2626
- the derived flags are set accordingly.
27+
28+
**Caveat**
29+
30+
[Cancelation](../guides/query-cancellation.md) does not work.

docs/framework/react/reference/useSuspenseQueries.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Same structure as [useQueries](../useQueries), except that for each `query`:
2525
- `status` is always `success`
2626
- the derived flags are set accordingly.
2727

28-
**Caveat**
28+
**Caveats**
2929

3030
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`.
31+
32+
[Cancelation](../guides/query-cancellation.md) does not work.

docs/framework/react/reference/useSuspenseQuery.md

+4
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ Same object as [useQuery](../useQuery), except that:
2323
- `isPlaceholderData` is missing
2424
- `status` is always `success`
2525
- the derived flags are set accordingly.
26+
27+
**Caveat**
28+
29+
[Cancelation](../guides/query-cancellation.md) does not work.

0 commit comments

Comments
 (0)