Evaluate a CSS media query via JavaScript.
const isTablet = useMediaQuery("(max-width: 768px)"); return <div>{isTablet ? "is phone or tablet" : "is desktop"}</div>;