No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.babelrc
.editorconfig
.eslintrc
.gitignore
.npmignore
.watchmanconfig
LICENSE.md
README.md
index.js
package.json

README.md

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