Skip to content

Commit

Permalink
docs: Add known limitation about cancellation with suspense hooks (#7958
Browse files Browse the repository at this point in the history
)

* docs: Add known limitation about cancellation with suspense hooks

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 27, 2024
1 parent d29997a commit 804357b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/framework/react/guides/query-cancellation.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,7 @@ return (
```

[//]: # 'Example7'

## Limitations

Cancelation does not work when working with `Suspense` hooks: `useSuspenseQuery`, `useSuspenseQueries` and `useSuspenseInfiniteQuery`.
4 changes: 4 additions & 0 deletions docs/framework/react/reference/useSuspenseInfiniteQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 3 additions & 1 deletion docs/framework/react/reference/useSuspenseQueries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 4 additions & 0 deletions docs/framework/react/reference/useSuspenseQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 804357b

Please sign in to comment.