Skip to content

Latest commit

 

History

History

media-query

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

🎒 @hooks/media-query

React hook to respond to media queries

NPM version Travis License

Install

npm i @hooks/media-query

Usage

useMediaQuery

useMediaQuery(query: string, fallback = false): boolean

Parameters

query: string

A string representing the media query to parse.

fallback = false

The initial match state, defaults to false.

Return

Returns true if the document currently matches the media query list, false if not.