Open arusakov opened 7 years ago
I have made 2 simple changes in next branch:
next
plugins
react-hot-reload/webpack
webpack.config.js
My git diff:
diff --git a/.babelrc b/.babelrc index 9b921a0..0466330 100644 --- a/.babelrc +++ b/.babelrc @@ -3,8 +3,5 @@ ["es2015", {"modules": false}], "stage-2", "react" - ], - "plugins": [ - "react-hot-loader/babel" ] } diff --git a/webpack.config.js b/webpack.config.js index 67cccb4..e2e4d89 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -35,6 +35,7 @@ module.exports = { { test: /\.jsx?$/, use: [ + 'react-hot-loader/webpack', 'babel-loader', ], exclude: /node_modules/,
And everything is fine, no errors, hot reloading is working expect state saving. After every hot reloading state.counter become 0.
state.counter
I don't know it is bug of react-hot-reload or it is bug of this configuration.
react-hot-reload
We'd prefer people use the Babel loader. Can you share what was happening previously?
I have made 2 simple changes in
next
branch:plugins
from .babelrcreact-hot-reload/webpack
towebpack.config.js
My git diff:
And everything is fine, no errors, hot reloading is working expect state saving. After every hot reloading
state.counter
become 0.I don't know it is bug of
react-hot-reload
or it is bug of this configuration.