Closed
Description
Is this a bug report?
Yes.
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
HMR, hot-reloading
Environment
"react-scripts": "2.1.8"
Steps to Reproduce
- Enable HMR. Wrap the main
render
method withmodule.hot.accept(
. - Edit a component and add
throw new Error('boo')
somewhere. - An error overlay should be visible.
- Remove the error statement.
- The page is hard-reloading instead of patching.
Expected Behavior
The page should not hard-reload.
Actual Behavior
The page is hard-reloading.
Here is the full video https://take.ms/DjMTV. You can see that console logs are disappearing, and it means hard-reload.
HMR works correctly if I update something without errors.
redbox-react works correctly, and it's possible to implement HMR on errors, but CRA uses a different library.