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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    3
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i @hooks/media-query

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

4.03 kB

Total Files

6

Last publish

Collaborators

  • simmo