-
Notifications
You must be signed in to change notification settings - Fork 800
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
Example Error Boundary #1111
Comments
:nods: It's not easy to catch "update" event and remove error overlay. |
Never mind. AppContainer has a prop named |
Should I also use |
In short:
We have to:
|
4.6.0 gives you everything. |
@theKashey thanks! One small thing. I can see below error when there is any runtime error. Is it expected or it should be displayed only during hot updates? |
As long as it displays an error - yes. |
Should work "right" with the last version. |
Description
Is it possible to provide an example Error Boundary?
I tried to create my own component using the official example with 'redbox-react', but the error is not gone after doing more changes. I keep the error in the state, and the error is never cleared.
Example component
How to clear the state if there are any changes?
Expected behavior
Flow should look like this:
edit code -> runtime error -> error boundary (red box) -> edit code again and fix error -> error boundary is hidden.
Actual behavior
edit code -> runtime error -> error boundary (red box) -> edit code again and fix error -> error boundary is still visible.
Environment
React Hot Loader version: 4.5.1
The text was updated successfully, but these errors were encountered: