question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.0.0 - Safari - useBreakpointValue 'mediaQuery.addEventListener' is undefined

See original GitHub issue

Hello there,

on latest release there is problem with using useBreakpointValue in Safari browser.

Enclosing error message and reproducible demo.

TypeError
mediaQuery.addEventListener is not a function. (In 'mediaQuery.addEventListener("change", handleChange)', 'mediaQuery.addEventListener' is undefined)

codesandbox demo

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
paul-vdcommented, Oct 21, 2020

@sebqq yea thanks I was just about to do that 😉 thanks. I often turn to patch-package ❤️

1reaction
ljosberinncommented, Sep 29, 2020

Nevermind, I totally ignored you mentioned useBreakpointValue 🤦‍♂️ I forgot reverting it there, sorry. Will change that later today and it will be fixed in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - matchMedia().addListener marked as deprecated ...
1 - logs error addEventListener is not a function. Had to revert code to deprecated addListener() to get Angular web app to work...
Read more >
MediaQueryList.addListener() - Web APIs - MDN Web Docs
A function or function reference representing the callback function you want to run when the media query status changes. Return value. None ( ......
Read more >
Solved: ".matchMedia(...).addEventListener is not a function ...
In modern browsers, the MediaQueryList object inherits from the EventTarget object, which makes the addEventListener method available on the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found