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

useMedia Bug #9

Closed
sasweb opened this issue Jan 29, 2019 · 1 comment
Closed

useMedia Bug #9

sasweb opened this issue Jan 29, 2019 · 1 comment

Comments

@sasweb
Copy link

sasweb commented Jan 29, 2019

After changing a route (e.g. from '/' to '/items') the following error is thrown:

TypeError: Failed to execute 'removeEventListener' on 'EventTarget': 2 arguments required, but only 1 present.

I'm using CRA 2 and react-router.

@gragland
Copy link
Contributor

Whoops I left out the first argument for remove removeEventListener. It should be window.removeEventListener('resize', handler) instead. This is now fixed in the code example.

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