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

ReduxRouter does not remove hashchange-listener on unmount #132

Open
cwrs opened this issue Oct 21, 2015 · 0 comments
Open

ReduxRouter does not remove hashchange-listener on unmount #132

cwrs opened this issue Oct 21, 2015 · 0 comments
Labels
Milestone

Comments

@cwrs
Copy link

cwrs commented Oct 21, 2015

When unmounting an React-app with ReactDOM.unmountComponentAtNode() the hashchange-listener of createHistory is not removed. It is added by the history.listen call in client.js, but the returned unlisten-function is not stored and never called.
Somehow the unlisten function needs to get called in ReduxRouter.componentWillUnmount().

As a quickfix, I added the unlisten-function to the returned store of historySynchronization() and called it from ReduxRouter.componentWillUnmount, but I guess thats not the best way to do it...

Thx for your help!

@Scarysize Scarysize added the bug label Dec 24, 2015
@Scarysize Scarysize modified the milestone: 2.0.0beta1 Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants