-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Update error-boundaries.md #3416
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @0000marcell! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Deploy preview for reactjs ready! Built without sensitive environment variables with commit 214360c |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
content/docs/error-boundaries.md
Outdated
| > * Server side rendering | ||
| > * Errors thrown in the error boundary itself (rather than its children) | ||
| > In development an error overlay will be shown on top of the screen reguardless if you're using error boundaries or not, you can close the overlay by pressing esc |
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.
That depends on the framework you're using (e.g nextjs or create-react-app). It is not included in React itself. So we should probably include that an error overlay might be shown depending on the framework you're using.
I would leave out instructions on how to close it since that depends on the specific implementation of the error overlay.
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.
So something like this "In development an error overlay might be shown on top of the screen regardless if you're using error boundaries or not, usually you can close this overlay"
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.
Yeah, and I would add that this depends on the framework you're using and give some examples (create-react-app, nextjs).
Usually I would be careful with documenting 3rd party behavior but at this point it's somewhat convention that your React framework should implement some error overlay.
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've changed to "In development, an error overlay might be shown on top of the screen regardless if you're using error boundaries or not, create-react-app and nextjs implement this error overlay"
eps1lon
left a comment
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.
Thanks!
A lot of people don't know about the error overlay and think their error boundaries are not working, I think it would be good to at least mention this behavior in the docs, it would save people a lot of time and suffering :D