[HMR] connected
client.js?9105:123 [HMR] bundle rebuilding
client.js?9105:126 [HMR] bundle rebuilt in 807ms
process-update.js?c782:27 [HMR] Checking for updates on the server...
process-update.js?c782:81 [HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.
process-update.js?c782:89 [HMR] - ./src/routes/contact/Contact.js
It seams babel-plugin-react-transform not working with stateless functional components yet
(see gaearon/babel-plugin-react-transform/pull/85)
But you can add simple hot reload by yourself (example)
// client.js
// ...
let HotRouter = Router;
function render(state) {
HotRouter.dispatch(/* ... */);
}
function run() {
// ...
if (module.hot) {
module.hot.accept('./routes', () => {
HotRouter = require('./routes').default;
render(currentState);
});
}
}
// ...
React Hot Loader 3 supports functional components without destroying the state.
It supersedes both React Hot Loader and React Transform, and is built on lessons learned from both.
Check it out: https://github.com/gaearon/react-hot-boilerplate/pull/61
try react-hot-loader.
Most helpful comment
React Hot Loader 3 supports functional components without destroying the state.
It supersedes both React Hot Loader and React Transform, and is built on lessons learned from both.
Check it out: https://github.com/gaearon/react-hot-boilerplate/pull/61