Introduction
Subscribe to a CSS media query and re-render when it changes. Useful for responsive layouts without duplicating breakpoint logic in CSS only.
Platform: React (browser). Dependencies: react only.
Hook
Example
tsx
const isMdUp = useMediaQuery("(min-width: 768px)");
Footer
Match the same breakpoints you use in Tailwind (sm, md, lg) for consistent behavior.