-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error boundaries #7
Labels
enhancement
New feature or request
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Objective: Add the ability to capture component rendering errors higher up in the component tree and provide a fallback component (i.e. an user-facing error screen).
Proposed solution: Add an
<ErrorBoundary>
component that sets afallback
property on itself. When a descendant throws an error while rendering, it can search up the component tree until a component with afallback
property is found. If none is found, the descendant will instead render nothing (and its hook memory will be dropped?).Additional details
The text was updated successfully, but these errors were encountered: