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.

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 6 months ago

Package Health Score

77 / 100
Full package analysis

Similar packages