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

handleResize: Can only update a mounted or mounting component. #51

Open
Krempelj opened this issue Dec 16, 2017 · 1 comment
Open

handleResize: Can only update a mounted or mounting component. #51

Krempelj opened this issue Dec 16, 2017 · 1 comment

Comments

@Krempelj
Copy link

Hi.
So navigating away from a component that uses this cool package and then resizing the displaying component causes this error. Is there a way to avoid this?

handleresize

@Garoth
Copy link

Garoth commented Apr 24, 2018

FWIW, I figured out what the issue here is. You have to .bind() your resize function before you assign it in window.addEventListener. Because this wasn't done, when the Section component tries to unmount, it doesn't correctly remove the resize listener (different function). The fix is trivial, but it looks like the author of this package is no longer resolving Pull Requests.

I will probably end up making a fork for my own projects

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