I wish to begin React Native app with Portrait orientation. Presently I am utilizing the react-native-orientation-locker library to deal with the preliminary orientation. Nevertheless it’s not working accurately.
My App.js appears to be like like this.
import Orientation from 'react-native-orientation-locker';
export const App = () => {
useLayoutEffect(() => {
Orientation.lockToPortrait();
}, []);
return (
<RootContainer>
<MyApp />
</RootContainer>
);
};
export default App;
I feel this must be dealt with from the native aspect as a result of the JavaScript codes run after the preliminary course of. Possibly I’ve so as to add a code MainApplication.java and AppDelegate.mm?