Skip to content

Commit 8cedf5c

Browse files
rliljestTkDodo
andauthored
docs: update suspense.md (TanStack#5923)
* docs: update suspense.md Fixes TanStack#5920 * Update docs/react/guides/suspense.md --------- Co-authored-by: Dominik Dorfmeister <[email protected]>
1 parent 6d0538a commit 8cedf5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/react/guides/suspense.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ React Query can also be used with React's Suspense for Data Fetching API's. For
1111

1212
When using suspense mode, `status` states and `error` objects are not needed and are then replaced by usage of the `React.Suspense` component (including the use of the `fallback` prop and React error boundaries for catching errors). Please read the [Resetting Error Boundaries](#resetting-error-boundaries) and look at the [Suspense Example](https://codesandbox.io/s/github/tannerlinsley/react-query/tree/main/examples/react/suspense) for more information on how to set up suspense mode.
1313

14-
In addition to queries behaving differently in suspense mode, mutations also behave a bit differently. By default, instead of supplying the `error` variable when a mutation fails, it will be thrown during the next render of the component it's used in and propagate to the nearest error boundary, similar to query errors. If you wish to disable this, you can set the `throwOnError` option to `false`. If you wish that errors are not thrown at all, you can set the `throwOnError` option to `false` as well!
14+
If you want mutations to propagate errors to the nearest error boundary (similar to queries), you can set the `throwOnError` option to `true` as well.
1515

1616
Enabling suspense mode for a query:
1717

0 commit comments

Comments
 (0)