react-fullpage
react-fullpage copied to clipboard
handleResize: Can only update a mounted or mounting component.
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?
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