Skip to content

tuckerconnelly/react-native-match-media

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published