-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Redux examples has the Provider HMR Warning #369
Comments
I added the following code to the file client.js and it removes the warning. if (module.hot) {
module.hot.accept();
module.hot.accept('./App', () => {
hydrate(
<Provider store={store}>
<BrowserRouter>
<App />
</BrowserRouter>
</Provider>,
document.getElementById('app')
);
});
} Anyone has any view of this? |
Can you submit a PR? |
Add |
@howardya's solution is the better one here. Using a random key silences the warning but doesn't change the fact that the store is being recreated on every update, which is what's not supported. It can lead to some wonky behavior, especially if you're using redux dev-tools or similar. By specifically handling the I'll take a look at making a PR for this. |
solve my problem! thanks man. |
Reproduce, git clone.
cd examples/with-redux
yarn
yarn start
then change any file, for instance, common/components/Counter.js, HMR will work, but browser will sound the following warning
I have tried to google around this error, but does not find any food solution to it. Anyone manage to overcome this?
The text was updated successfully, but these errors were encountered: