Unverified Commit 4e3f35b3 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

docs: update details about `unstable_retry()` behavior (#91827)

## Summary
- Updated the "Built-in error recovery" bullet in `catchError` docs to
say "retries rendering the error boundary's children with fresh data in
Server Components" instead of "re-fetches and re-renders the error
boundary's children, including Server Components"
parent 08954138
...@@ -12,7 +12,7 @@ The `unstable_catchError` function creates a component that wraps its children i ...@@ -12,7 +12,7 @@ The `unstable_catchError` function creates a component that wraps its children i
Compared to a custom React error boundary, `unstable_catchError` is designed to work with Next.js out of the box: Compared to a custom React error boundary, `unstable_catchError` is designed to work with Next.js out of the box:
- **Built-in error recovery** — [`unstable_retry()`](/docs/app/api-reference/file-conventions/error#unstable_retry) re-fetches and re-renders the error boundary's children, including Server Components. - **Built-in error recovery** — [`unstable_retry()`](/docs/app/api-reference/file-conventions/error#unstable_retry) re-renders the page inside a [Transition](https://react.dev/reference/react/startTransition), preserving Client Components state outside of the error boundary.
- **Framework-aware integration** — APIs like `redirect()` and `notFound()` work by throwing special errors under the hood. `unstable_catchError` handles these seamlessly, so they're not accidentally caught by your error boundary. - **Framework-aware integration** — APIs like `redirect()` and `notFound()` work by throwing special errors under the hood. `unstable_catchError` handles these seamlessly, so they're not accidentally caught by your error boundary.
- **Client navigation handling** — The error state automatically clears when you do a client navigation to a different route. - **Client navigation handling** — The error state automatically clears when you do a client navigation to a different route.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment