How to use the react-native-orientation-locker.lockToPortrait function in react-native-orientation-locker

To help you get started, we’ve selected a few react-native-orientation-locker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RocketChat / Rocket.Chat.ReactNative / app / views / SetUsernameView.js View on Github external
constructor(props) {
		super(props);
		this.state = {
			username: '',
			saving: false
		};
		const { server } = this.props;
		props.navigation.setParams({ title: server });
		Orientation.lockToPortrait();
	}
github unreg / loreader / src / app.js View on Github external
componentDidMount() {
    Orientation.lockToPortrait();
  };
github RocketChat / Rocket.Chat.ReactNative / app / views / OnboardingView / index.js View on Github external
constructor(props) {
		super('OnboardingView', props);
		BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);
		this.previousServer = props.navigation.getParam('previousServer');
		Orientation.lockToPortrait();
	}

react-native-orientation-locker

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

MIT
Latest version published 3 days ago

Package Health Score

80 / 100
Full package analysis