A React Hook that tracks the state of CSS media query/queries.
Try to resize the window to see the effect.
See API for more details.
Click links below to view source on GitHub.
A media query string
, or an array of media query string
s.
AddEventListenerOptions
is options of useEventListener
, see useEventListener#options for more details.
If queryString
is a string
, returns a boolean
value that indicates whether the media query matches.
If queryString
is an array, returns an array of boolean
values that indicate whether the media queries match.