0.1.0 • Published 6 years ago
@hooks/media-query v0.1.0
🎒 @hooks/media-query
React hook to respond to media queries
Install
npm i @hooks/media-queryUsage
useMediaQuery
useMediaQuery(query: string, fallback = false): booleanParameters
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.