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

componentWillUnmount should only ever be called once #6574

Closed
jimfb opened this issue Apr 21, 2016 · 1 comment
Closed

componentWillUnmount should only ever be called once #6574

jimfb opened this issue Apr 21, 2016 · 1 comment

Comments

@jimfb
Copy link
Contributor

jimfb commented Apr 21, 2016

Error boundries might help, if someone is using them, but if you're not using error boundaries we shouldn't ever attempt to unmount a single component instance more than once.

https://jsfiddle.net/fxq44m0t/

The only reason it's not an infinite loop is that we eventually run out of stack space :P. With good tail recursion in the JSVM, this could become an infinite loop.

Anyway, this is more than a contrived example, because the ReactRouter+redux combination creates situations where this type of thing happens.

@jimfb
Copy link
Contributor Author

jimfb commented Apr 28, 2016

Fixed in #6613

@jimfb jimfb closed this as completed Apr 28, 2016
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

1 participant