useMediaQuery #13152
Unanswered
AaronAngeloRagudos
asked this question in
Ideas
useMediaQuery
#13152
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I was doing a project and needed to use media queries in different components. At first, I could do it on my own for personal use, but then I thought that I would need to use react as a dependency for one file that is reusable for a lot of projects with this hook (for tests, which is quite inconvenient). I'd like to try contributing here to implement this kind of hook. I was thinking that this hook would take your media query (e.g. '(max-width: 769px)') and would return true or false if that matches or not. Although, I am only a few months (4-5) in coding stuff, and 2-3months coding ReactJS using Vite. Is there a hook like this already? If there are none, I'd love it if this was implemented, or if you can suggest other ways to have media listeners and such. Thank you! :)
Beta Was this translation helpful? Give feedback.
All reactions