react-native-match-media

0.1.1 • Public • Published

react-native-match-media

window.matchMedia polyfill for React Native

Has a peer dependency of walmartreact/react-native-orientation-listener, so make sure that's installed first.

Usage

import matchMedia from 'react-native-match-media'
 
global.matchMedia = matchMedia
if (global.matchMedia('(min-width: 400px)').matches) {
  // Do something
}

License

MIT

Package Sidebar

Install

npm i react-native-match-media

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • tuckerconnelly