You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/docs/guides/suspense.md
+26-13Lines changed: 26 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,23 +43,36 @@ In addition to queries behaving differently in suspense mode, mutations also beh
43
43
44
44
## Resetting Error Boundaries
45
45
46
-
Whether you are using **suspense** or **useErrorBoundaries** in your queries, you will need to know how to use the `queryCache.resetErrorBoundaries` function to let queries know that you want them to try again when you render them again.
46
+
Whether you are using **suspense** or **useErrorBoundaries** in your queries, you will need to know how to use the `ReactQueryResetErrorBoundary` component to let queries within this boundary know that you want them to try again when you render them again.
47
+
48
+
There are two ways to trigger a reset:
49
+
50
+
1. By providing a function as a child of `ReactQueryResetErrorBoundary`. The first argument will be an object with a `reset` function.
51
+
2. By using the `useResetErrorBoundary()` hook. The returned value will be an object with a `reset` function.
47
52
48
53
How you trigger this function is up to you, but the most common use case is to do it in something like `react-error-boundary`'s `onReset` callback:
0 commit comments