react-native-match-media-polyfill
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

react-native-match-media-polyfill

window.matchMedia polyfill for React Native so you can use react-responsive or similar libs. also suports react-native-web

Installation

Open a Terminal in your project, and run:

yarn add react-native-match-media-polyfill

Usage

Import the polyfill at the top of your file before using the window.matchMedia API or at top of your index.js or App.js file

import 'react-native-match-media-polyfill'
// use the match media API

And we're done 🎉

LICENSE

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.35,060latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.35,060
1.0.20
1.0.13

Package Sidebar

Install

npm i react-native-match-media-polyfill

Weekly Downloads

5,063

Version

1.0.3

License

MIT

Unpacked Size

14.1 kB

Total Files

25

Last publish

Collaborators

  • arnnis