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.
- Host: GitHub
- URL: https://github.com/henninghall/react-native-screen-orientation-listener
- Owner: henninghall
- Created: 2018-08-23T16:14:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T09:37:09.000Z (almost 7 years ago)
- Last Synced: 2025-02-01T04:15:38.542Z (4 months ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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';```