Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@rnhooks/device-orientation

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rnhooks/device-orientation

React Native hook for Device Orientation

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
20
25%
Maintainers
2
Weekly downloads
 
Created
Source

@rnhooks/device-orientation Build Status Maintainability

React Native hook for device orientation

Demo

Installation

yarn add @rnhooks/device-orientation

Usage

import useDeviceOrientation from '@rnhooks/device-orientation';

function App() {
  const deviceOrientation = useDeviceOrientation();

  return (
    <View style={styles.container}>
      <Text style={styles.type}>Device orientation is:</Text>
      <Text style={styles.effectiveType}>{deviceOrientation}</Text>
    </View>
  );
}

Output

NameValuesDescription
deviceOrientationportrait, landscapepossible values are portrait and landscape

Keywords

react-native

FAQs

Package last updated on 06 Feb 2021

Did you know?

Socket

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