Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen rerender issue after using this library #293

Open
ionictest2017 opened this issue Mar 6, 2024 · 1 comment
Open

Screen rerender issue after using this library #293

ionictest2017 opened this issue Mar 6, 2024 · 1 comment

Comments

@ionictest2017
Copy link

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",

@IgorGanapolsky
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants