/react-native-orientation-plugin

React Native Orientation Config Plugin

Primary LanguageJavaScriptMIT LicenseMIT

react-native-orientation-plugin

An expo config plugin created to insert native code into the compiled ios/android app and allow react-native-orientation to work with EAS build

Setup

npm install react-native-orientation

npm install @lyrahealth-inc/react-native-orientation-plugin

Add the config plugin to the plugins array of your app.json or app.config.js:

{
  "expo": {
    "plugins": ["@lyrahealth-inc/react-native-orientation-plugin"]
  }
}

Usage:

import Orientation from 'react-native-orientation';

Orientation.lockToPortrait();

Reference react-native-orientation library for more documentation.