0.1.2 • Published 4 years ago

@koheimukai/react-media-query v0.1.2

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

react-media-query

a package that allows you to see if a given media query matches

NPM JavaScript Style Guide

Install

npm install --save react-media-query

Usage

import React, { Component } from 'react'

import { useMediaQuery } from '@koheimukai/react-media-query'

const Example = () => {
  const matches = useMediaQuery('(max-width: 600px)')
  return (
    <div>{matches && <span>Mobile</span>}</div>
  )
}

License

MIT ©


This hook is created using create-react-hook.

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

1.0.0

4 years ago