Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillUnmount() { Orientation.removeOrientationListener(this._onOrientationDidChange); }
A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.