useMedia

useMedia is a custom hook to handle media queries. It utilizes json2mq to parse a string or object into json.

The useMedia hook returns an object with the following fields:

NameTypeDefaultDescription
matchbooleanTrue if the media query matches, false otherwise.
import { useMedia } from 'minerva-ui';

Usage