Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

useMedia throw "addEventListener is not a function" error occurs in browsers ios13.1 and below

Aperta
#2,554 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@suuzhh ci sta già lavorando.

Dal 19/7/2024.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start with the useMedia hook and reproduce the reported exception in Safari 13.1 or an equivalent lower iOS Safari environment. Compare the behavior with the previously working package version and verify that useMedia no longer throws an addEventListener error in the reported browser versions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
44k
Fork
3.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di streamich/react-use

Tutte le issue di streamich/react-use

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.