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

resize event listener not cleaned up #15

Open
Kinbaum opened this issue Nov 10, 2023 · 0 comments · May be fixed by #16
Open

resize event listener not cleaned up #15

Kinbaum opened this issue Nov 10, 2023 · 0 comments · May be fixed by #16

Comments

@Kinbaum
Copy link

Kinbaum commented Nov 10, 2023

@vaneenige I'm using the cobe library to render a globe on the screen. That library is built on top of phenomenon. What I've noticed is that the resize event listener is never removed when the destroy method is called.

When I scroll my globe out of view I remove it from the DOM as it's wasted resources when it's offscreen.
Looking at the dev tools though, I see multiple addEventListeners for resize as the component mounts / unmounts

Screenshot 2023-11-10 at 1 37 24 PM

Here is a PR #16 with the proposed change

@Kinbaum Kinbaum linked a pull request Nov 10, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant