Skip to content
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

Closed
sairion opened this issue Apr 10, 2017 · 4 comments
Closed

Experiencing unmount on hot loading #13

sairion opened this issue Apr 10, 2017 · 4 comments

Comments

@sairion
Copy link

sairion commented Apr 10, 2017

Not sure it is react-redux or this, but I have tried across different versions (4 to 5) of react-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() and componentWillUnmount() gets called.

@kirill-konshin
Copy link
Owner

That's how hot reloading works. What is the issue? You get corrupted store after hot reload?

@sairion
Copy link
Author

sairion commented Apr 11, 2017

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.

@sairion sairion closed this as completed Apr 11, 2017
@kirill-konshin
Copy link
Owner

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.

@sairion
Copy link
Author

sairion commented Apr 11, 2017

Yeah, please disregard. I think I misunderstood hot loading concept in that part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants