react-navigation: App randomly freezes when react-native Modal is shown while preventing remove screen with usePreventRemove on iOS #2125
Labels
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snack or repo is provided
Description
I have a NativeStackNavigator with 2 screens; on the first screen i have a button to navigate to the second screen; on the second screen, i am using the
usePreventRemove
hook to show a confirmation modal to the user when i tries to navigate to the previous screen;here it is an example of the bug behaviour:
RPReplay_Final1715264311.MOV
Steps to reproduce
the freeze occurs randomly, so repeating steps from 3 to 5 multiple times is sometimes needed. in order to enhance the chances of the bug to occur, it is useful to run the app on a physical device (iPhone) and repeat steps from 3 to 5 multiple times rapidly. I was able to reproduce the bug only on iOS
Snack or a link to a repository
https://github.com/BadLice/modal-freeze-reproducer
Screens version
3.31.1
React Native version
0.74.1
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
iPhone 12
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: