-
Notifications
You must be signed in to change notification settings - Fork 3
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
No disconnecting when component unmounts. #3
Comments
Hi @tomisu ! Thanks for opening this. What you are saying makes a lot of sense to me, would you like to submit a PR with that change? I will more than happy to merge it :) |
@zzarcon I don't seem to have permission to push into a new branch. |
@tomisu You can create a fork and push the change to it. After that, you can create a pull request based on your fork (see GitHub's documentation on PR). But since you are making a small change, there's an easier way to do this: Go to the file you want to change on GitHub, and click the pencil icon on the upper-right corner. After that, the website should guide you through the process. |
Isn't there a typo there? resizeObserver.disonnect(); <-missing c |
You're totally right, how embarrassing! I crated a PR: #6 Thanks! |
@zzarcon Since these PRs are all merged and it's been a while since then, can you publish a new version to npm? |
While using this, I found this problem: if the component using this hook unmounts, React complains about a memory leak.
To fix this, resizeObserver should disconnect on
useEffect
's return function:The text was updated successfully, but these errors were encountered: