@expo/match-media
Universal polyfill for match media API using Expo APIs on mobile
Last updated 2 months ago by evanbacon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @expo/match-media 
SYNC missed versions from official npm registry.

???? 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

Current Tags

  • 0.0.0-alpha.2                                ...           alpha (4 months ago)
  • 0.0.0-alpha.5                                ...           latest (2 months ago)

5 Versions

  • 0.0.0-alpha.5                                ...           2 months ago
  • 0.0.0-alpha.4                                ...           2 months ago
  • 0.0.0-alpha.2                                ...           4 months ago
  • 0.0.0-alpha.1                                ...           5 months ago
  • 0.0.0-alpha.0                                ...           5 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |