Import this in your client-side component
MyComponent.tsx
import { useMediaQuery } from "react-amazing-hooks";| Api | Description | Type | Return Type | Example |
|---|---|---|---|---|
| useMediaQuery | A custom hook to check media query conditions. Can be used to conditionally render components or apply different styles based on screen size. | MediaQueryParams* | boolean | const isMobile = useMediaQuery({ max: 600 }); |
Check the MediaQueryParams in the 'Types' tab. *