react-use
react-use copied to clipboard
useMedia throw "addEventListener is not a function" error occurs in browsers ios13.1 and below
What is the current behavior?
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-use. Paste the link to your JSFiddle or CodeSandbox example below:
What is the expected behavior?
Using useMedia in a lower version of Safari throws an exception, prompting "addEventListener is not a function"
A little about versions:
- user agent string: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1"
- OS: IOS
- Browser (vendor and version): Safari 13.1
- React: 17.0.2
-
react-use: 17.4.3 - Did this worked in the previous package version? : yes
Assign me this issue
Assign me this issue
I don't have permission, waiting for the administrator to handle @omwagh28