Skip to content

Commit 3b81a6f

Browse files
committed
Preserve useTransition error guidance
1 parent 73e0b39 commit 3b81a6f

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎src/content/reference/react/useTransition.md‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,12 +1567,7 @@ main {
15671567
15681568
### Displaying an error to users with an error boundary {/*displaying-an-error-to-users-with-error-boundary*/}
15691569
1570-
The `startTransition` function returned by `useTransition` is associated with
1571-
the component that called the Hook. If the Action passed to `startTransition`
1572-
throws an error or returns a rejected Promise, the nearest
1573-
[Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary)
1574-
can handle the error. Wrap the component that calls `useTransition` in an Error
1575-
Boundary to display a fallback for these errors.
1570+
If a function passed to `startTransition` throws an error or returns a rejected Promise, you can display an error to your user with an [error boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary). To use an error boundary, wrap the component where you are calling the `useTransition` in an error boundary. Once the function passed to `startTransition` errors, the fallback for the error boundary will be displayed.
15761571
15771572
<Sandpack>
15781573

0 commit comments

Comments
 (0)