-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Experiencing unmount on hot loading #13
Comments
That's how hot reloading works. What is the issue? You get corrupted store after hot reload? |
That is ... not how it should work, otherwise we will just use reload, not hot loader. I was not able to fix the issue myself so I just ditched next.js. Closing. |
Can you explain what the problem is? Unmount and then mount is an expected behavior since the component has to be replaced with the new version. If this has side effects like broken store - that's a bug. |
Yeah, please disregard. I think I misunderstood hot loading concept in that part. |
Not sure it is
react-redux
or this, but I have tried across different versions (4 to 5) ofreact-redux
and it occurs consistently, so I believe it would be better to post here (if you think it is not related to this lib, feel free to close please!)The issue is simple - whenever hot loading happens via Next.js, components from root get unmounted and re-mounted. I can confirm this happens in the official example too, which is also using your library. Every time I save, I can see
componentDidMount()
andcomponentWillUnmount()
gets called.The text was updated successfully, but these errors were encountered: