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

Thought about using matchMedia instead of innerWidth? #46

Open
joetidee opened this issue Sep 9, 2020 · 1 comment
Open

Thought about using matchMedia instead of innerWidth? #46

joetidee opened this issue Sep 9, 2020 · 1 comment

Comments

@joetidee
Copy link
Contributor

joetidee commented Sep 9, 2020

A colleague of mine came across this article:
https://css-tricks.com/working-with-javascript-media-queries/

Wondered if this package might consider allowing matchMedia to be used as a alternative for innerWidth?

@m-hoffmann
Copy link

@joetidee Since there seems to be no further development here, I have forked this library. I implemented support for window.matchMedia there.

https://github.com/m-hoffmann/react-hook-breakpoints

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