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

Unregister event listeners on unmount #104

Closed
emibcn opened this issue Mar 12, 2021 · 2 comments
Closed

Unregister event listeners on unmount #104

emibcn opened this issue Mar 12, 2021 · 2 comments

Comments

@emibcn
Copy link
Contributor

emibcn commented Mar 12, 2021

When unmounting this component, some events are still fired.

Solution

Clean side effects related to DOM event listeners:

  • Create instance methods so they remain unchanged for the removeEventListener call
  • Add componentWillUnmount with all the removeEventListener calls
@emibcn
Copy link
Contributor Author

emibcn commented Mar 23, 2021

Duplicate of #57

@justinmc
Copy link
Owner

Closing with #105

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