react-hot-loader: React module is not hot updated after my upgrade of webpack to v2 and webpack-dev-server to v2
If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.
Description
React module is not updated, after I edited ./src/components/DemoButton.js, changed something.
Expected behavior
Modules updated.
Actual behavior

Update traces are correct.

Breakpoints in render method was called. But nothing happened in DOM tree.
Environment
React Hot Loader version: 3.0.0-beta.6
Run these commands in the project folder and fill in their results:
node -v: v6.6.0npm -v: 3.10.3
Then, specify:
- Operating system: macOS
- Browser and version: Chrome 55.0.2883.95 (64-bit)
Reproducible Demo
https://github.com/vivaxy/gt-react-scaffold/tree/db4a02582452772ac4533b3b0f199e831f339578
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 23
@vivaxy @nikolaipaul this fixed my issue, have you tried it? https://github.com/gaearon/react-hot-loader/pull/240#issuecomment-258614348
i currently have:
rather than
module.hot.accept('./containers/root', () => {Thanks for that. I quickly went through, and it seems your code is probably not using ES2015 imports from webpack. Following code fixes the issue:
However, it should not be required when using webpack ES2015 built-in imports. To have that, in your
.babelrcyou should have eitheres2015plugin orlatest(latest currently includes es2015).This is how to use
latestwithmodule: false(https://babeljs.io/docs/plugins/preset-latest/#usagees2015):I’ll mention it in the docs.
my hot reload works now. but only once. after that the state in all components below Root is lost. any idea why?
@bjudson - I spent like two days getting it to work before finding your comment, you’re a lifesaver.