You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
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