New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react hot loader v4 hot HOC #905
Comments
There is nothing we could do. There is nothing we could change, as long things are working as the supposed to work. You are reloading a file, that file re-creates the store, dropping all the information inside, Redux Provider warns you about that action and next RHL will prevent There is a general rule - you shall not hot reload application initialization code. Including store creation and react-dom/render. How to fix const App = () => {
return (
<Provider store={store}>
{/* ... */} <--- take this
</Provider>
);
}; And extract to another file. And mark as hot So you will be able to reload |
I had this problem as well. I'm posting the exact error message so it can be found in search (I had a hard time finding this thread that solved it for me). This is the error I received when trying to hot-reload like the OP:
|
Just put |
- fix todo en utilisant react-hot-loader V4 gaearon/react-hot-loader#905 (comment) - utilisation du plugin webpack déjà installé
- fix todo en utilisant react-hot-loader V4 gaearon/react-hot-loader#905 (comment) - utilisation du plugin webpack déjà installé
- fix todo en utilisant react-hot-loader V4 gaearon/react-hot-loader#905 (comment) - utilisation du plugin webpack déjà installé
Description
What you are reporting:
react hot loader v4 hot HOC bug with react-redux Provider
Expected behavior
What you think should happen:
work well
Actual behavior
What actually happens:
when hot loader
Then the hot update will not have an error message.
Temporary solution for v4
add random key to Provider
Environment
React Hot Loader version:
Run these commands in the project folder and fill in their results:
node -v
: v8.2.1npm -v
: 5.6.0Then, specify:
The text was updated successfully, but these errors were encountered: