Skip to content

Conversation

@0000marcell
Copy link

@0000marcell 0000marcell commented Nov 30, 2020

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

@facebook-github-bot
Copy link
Collaborator

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!

@reactjs-bot
Copy link

reactjs-bot commented Nov 30, 2020

Deploy preview for reactjs ready!

Built without sensitive environment variables with commit 214360c

https://deploy-preview-3416--reactjs.netlify.app

@facebook-github-bot
Copy link
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

> * 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
Copy link
Member

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.

Copy link
Author

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"

Copy link
Member

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.

Copy link
Author

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"

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants