Socket
Socket
Sign inDemoInstall

react-native-screen-orientation-listener

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-screen-orientation-listener

Detect screen orientation changes in React Native.


Version published
Weekly downloads
6
increased by500%
Maintainers
1
Install size
152 kB
Created
Weekly downloads
 

Readme

Source

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';

<ScreenOrientation onChange={onChange}>
    {/* Your app root */}
</ScreenOrientation>

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

Additional functions

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

Keywords

FAQs

Last updated on 27 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc