-
Notifications
You must be signed in to change notification settings - Fork 28.4k
docs: add graceful error boundary example #77781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
The `GracefullyDegradingErrorBoundary` is a custom error boundary that captures and preserves the current HTML before an error occurs. If a rendering error happens, it re-renders the captured HTML statically and displays a persistent notification bar to inform the user. | ||
|
||
```tsx filename="app/dashboard/error.tsx" switcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like if you are using nested error.tsx
, you might as well go the extra mile and implement some fallback UI when an error happens.
I see this being more useful as a recipe for global-error
.
Notifying the following users due to files changed in this PR based on this repo's notify modifiers: @timneutkens, @ijjk, @shuding, @huozhi:
|
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
49edc53
to
30970cd
Compare
|
This adds an example in the documentation for the errors page for a graceful error boundary in Next.js.