@roadmanfong/expo-match-media
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

👋 Welcome to
@expo/match-media

Universal polyfill for match media API using Expo APIs on mobile

GitHub Actions status


TL;DR: Demo

🏁 Setup

Install @expo/match-media in your project.

yarn add @expo/match-media

If you're using a React Native app that wasn't bootstrapped with the expo-cli then you'll need to install and link the expo module to use this package.

⚽️ Usage

Import the polyfill at the top of your file before using the window.matchMedia API.

import '@expo/match-media';
// use the match media API

What this does

  • In the browser: Nothing
  • In React Native apps: Polyfills the matchMedia API so you can use awesome libraries like react-responsive.

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.


License: MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.1
    0
  • 0.2.0
    0

Package Sidebar

Install

npm i @roadmanfong/expo-match-media

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

13.2 kB

Total Files

15

Last publish

Collaborators

  • roadmanfong