Hooks
useMediaQuery

Import this in your client-side component

MyComponent.tsx
import { useMediaQuery } from "react-amazing-hooks";
ApiDescriptionTypeReturn TypeExample
useMediaQueryA custom hook to check media query conditions. Can be used to conditionally render components or apply different styles based on screen size.MediaQueryParams*booleanconst isMobile = useMediaQuery({ max: 600 });

Check the MediaQueryParams in the 'Types' tab. *