gaearon / gaearon/react-hot-loader
RHL does not work if runtime error occurred
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 775
- PR merge metrics
- No merged PRs in 30d
Description
**Description:**
I have a component, if I make a runtime error inside render, nothing happens.
For Example:
```
const App = () => (
);
// when changed to
const App = () => (
);
```
**Current behaviour**
HMR says app is up to date. As a result, I do not know if my change applied, or it crashed.
The logger prints the error as warning in debug mode, in simple app example and does not show anything new in the large app, that already has some warnings.
**Expected behavior**
At the very least I would expect a reload that would show me the error afterwards.
As a step up, I would expect to have a way to connect my errorHandling for internal errors within HMR. Possibly with the real error message.
Could join both and make default behaviour reload page, but if given errorHandler, execute it instead.
As an alternative, simply throwing the original error is good enough. We only have warning at the moment, so it is not trackable.
Contributor guide
Assessment
This issue has not been assessed yet.