react-native-screens
react-native-screens copied to clipboard
navigation.dispatch() works flaky on iOS (new arch)
Description
When I was testing #1738, I've spotted a weird bug while using navigation.dispatch() with type RESET on iOS. It seems that when user dispatches a reset to the navigation.dispatch, the screen is not changed - moreover, when orientation is also being changed, this view is being skewed during the rotation, resulting view to be narrowed:
https://github.com/software-mansion/react-native-screens/assets/23281839/9308cf48-d897-44b4-ba40-f524c295016a
As I have discovered, this issue should be reproducible on iOS 17, I've also tested it on iOS 16.
Steps to reproduce
- Launch repro from snack attached below. This repro comes originally from #1738, but apparently it works also there
- Press the button to go to landscape screen
- Press the button to go to home screen (it should have portrait orientation)
- The view should be narrowed
Snack or a link to a repository
https://github.com/tboba/screens-repro/tree/%40tboba/rns-orientation-glitch
Screens version
3.27.0
React Native version
0.72.4
Platforms
iOS
JavaScript runtime
Hermes
Workflow
None
Architecture
Fabric (New Architecture)
Build type
None
Device
iOS simulator
Device model
iPhone 15 Pro (iOS 17.0)
Acknowledgements
Yes