react-native-orientation-locker

A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation. (by wonday)

React-native-orientation-locker Alternatives

Similar projects and alternatives to react-native-orientation-locker

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better react-native-orientation-locker alternative or higher similarity.

react-native-orientation-locker reviews and mentions

Posts with mentions or reviews of react-native-orientation-locker. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-15.
  • useScreenOrientation - React Native Snippet
    2 projects | dev.to | 15 Mar 2022
    Below I set up a useEffect that only fires once because it has no dependencies and then set up two listeners, one for iOS that uses react-native-orientation-locker and another for Android that uses the dimensions event listener from React Native itself (Don't forget to remove the listeners when the hook is destroyed). Basically, then on a screen orientation change we set the state to the correct OrientationType(PORTRAIT, PORTRAIT-UPSIDEDOWN, LANDSCAPE-LEFT, LANDSCAPE-RIGHT). For Android we just check the height against the width to discern whether it's in portrait or landscape. Of course, if when you read this, that react-native-orientation-locker is working consistently for Android then you won't need any of this specific Android code.

Stats

Basic react-native-orientation-locker repo stats
1
727
4.8
11 days ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com