Basic usage
Use the useMediaQuery hook to call window.matchMedia with SSR support. It must be used within a MediaQueryProvider component.
This hook is ideal for conditional rendering based on viewport size, user preferences, or other media features.
It subscribes to a single state shared by all media queries to ensure Suspense works correctly.
See the MediaQueryProvider docs here →