Code
Context
If you have a special case, when you need to get media query result inside you react app (for example, you want to show different components on mobile and desktop) this is the way to do so.
useMediaQuery is a react hook that makes testing for media query matches in your code easier and simpler.
Date:
Words: 120
Time: 1 min read
If you have a special case, when you need to get media query result inside you react app (for example, you want to show different components on mobile and desktop) this is the way to do so.