react-native-orientation-locker icon indicating copy to clipboard operation
react-native-orientation-locker copied to clipboard

Screen rerender issue after using this library

Open ionictest2017 opened this issue 11 months ago • 1 comments

here my code

function OnEnterHandleFullscreen() { console.log('OnEnterHandleFullscreen') if (isMobilePlatform) state.fullscreen ? Orientation.unlockAllOrientations() : Orientation.lockToLandscapeLeft(); }

function OnExitHandleFullscreen() { console.log('OnExitHandleFullscreen') if (isMobilePlatform) { setState({...state, fullscreen: false}); } }

{!Platform.isTV && Platform.OS !== 'web' && ( <OrientationLocker orientation={state.fullscreen ? LANDSCAPE : PORTRAIT} onChange={orientation => { console.log('--orientation fullscreen--',state.fullscreen) if (orientation !== PORTRAIT) { setState({...state, fullscreen: true}); } else { setState({...state, fullscreen: false}); } }} onDeviceChange={orientation => console.log('onDeviceChange', orientation) } /> )}

"react-native-orientation-locker": "^1.6.0",

ionictest2017 avatar Mar 06 '24 10:03 ionictest2017

@ionictest2017 Could you please format your code to be easy to read, so that we could troubleshoot for you?

IgorGanapolsky avatar Jun 13 '24 18:06 IgorGanapolsky