0.1.0 • Published 4 years ago

@hooks/media-query v0.1.0

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

🎒 @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.