An open API service indexing awesome lists of open source software.

https://github.com/henninghall/react-native-screen-orientation-listener

Detects screen orientation changes in React Native without making changes in native code.
https://github.com/henninghall/react-native-screen-orientation-listener

Last synced: 2 months ago
JSON representation

Detects screen orientation changes in React Native without making changes in native code.

Awesome Lists containing this project

README

        

# React Native Screen Orientation Listener
Detects screen orientation changes in React Native without making changes in native code.

## Installation
``yarn add react-native-screen-orientation-listener``

or

``npm install react-native-screen-orientation-listener --save``

## Usage
```
import { ScreenOrientation } from 'react-native-screen-orientation-listener';

{/* Your app root */}

const onChange = orientation => console.log("New screen orientation: " orientation)
```

## Additional functions

```import { isPortrait, isLandscape, getScreenOrientation } from 'react-native-screen-orientation-listener';```