@rnhooks/device-orientation
@rnhooks/device-orientation
npm i @rnhooks/device-orientation
@rnhooks/device-orientation

@rnhooks/device-orientation

React Native hook for Device Orientation

by react-native-hooks

0.0.2 (see all)License:MITTypeScript:Not Found
npm i @rnhooks/device-orientation
Readme

@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

Downloads/wk

210

GitHub Stars

18

LAST COMMIT

2yrs ago

MAINTAINERS

2

CONTRIBUTORS

2

OPEN ISSUES

1

OPEN PRs

8
VersionTagPublished
0.0.2
latest
2yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate