@hooks/media-query
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i @hooks/media-query

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

4.03 kB

Total Files

6

Last publish

Collaborators

  • simmo