expo/match-media


Universal polyfill for match media API using Expo APIs on mobile

License: MIT

Language: TypeScript

Keywords: breakpoint, css-in-js, expo, polyfill, react, react-native, react-native-web, responsive


👋 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

Project Statistics

Sourcerank 4
Repository Size 274 KB
Stars 43
Forks 5
Watchers 4
Open issues 6
Dependencies 1,051
Contributors 2
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Evan Bacon Stanisław Chmiela

Packages Referencing this Repo

@expo/match-media
Universal polyfill for match media API using Expo APIs on mobile
Latest release 0.0.0-alpha.4 - Updated - 43 stars

Something wrong with this page? Make a suggestion

Last synced: 2020-02-12 06:26:49 UTC

Login to resync this repository