Screen not available for interaction for a while when navigate back
Current Behavior When i go back any screen with physical back button or navigation back button. Previous screen can not interacting for a while (about 500ms) I dont use expo but when i check demo react-navigation on expo. I have noticed example app have problem like me. (Expo React Navigation SDK 39)
Expected Behavior
When i navigate back. I should be able to interact immediately this screen.
How to reproduce
You can reproduce on React navigation example (SDK 39) on Expo. if you quick press after go back from any page. You cannot interact with page.
https://streamable.com/a5gxi8
I have added video below. You can remark. When i go back. If i press so quick i must tap twice screen to push new Page.
Your Environment
| software | version |
|---|---|
| iOS or Android | Android 10 |
| @react-navigation/native | ^5.8.10 |
| @react-navigation/stack | ^5.12.8 |
| react-native-gesture-handler | ^1.9.0 |
| react-native-safe-area-context | 3.1.8 |
| react-native-screens | ^2.15.0 |
| react-native | 0.63.3 |
| expo | No |
| node | v14.15.1 |
| npm or yarn | 1.17.3 |
I am facing exactly same issue from 2 months. I found out that animation is causing this issue. So, turn animationEnabled to false.
I faced the same issue. It was related to react-native-screens. I was using version 3.1.0. I switched to version 3.3.0 and it worked fine:
react-native-screens: 3.3.0.
@react-navigation/bottom-tabs: 5.11.11.
@react-navigation/native: 5.9.4.
@react-navigation/stack: 5.14.4.
react-native: 0.64.2.
I started to face this issue recently after V6 & maybe because of react-native-screens.
For now I disabled animationEnabled to have fast interaction.
"@react-navigation/bottom-tabs": "^6.0.4",
"@react-navigation/drawer": "^6.1.3",
"@react-navigation/native": "^6.0.2",
"@react-navigation/stack": "^6.0.6",
"react-native-screens": "3.6.0",
Update:
I tested on version "react-native-screens": "2.18.1" and it fixed. The issue started with V3 of react-native-screens.
Update 2:
Using '@react-navigation/native-stack' instead of '@react-navigation/stack' on V6 with react-native-screens version 3.6.0 solved the problem for me as well.
I started to face this issue recently after V6 & maybe because of react-native-screens. For now I disabled
animationEnabledto have fast interaction."@react-navigation/bottom-tabs": "^6.0.4", "@react-navigation/drawer": "^6.1.3", "@react-navigation/native": "^6.0.2", "@react-navigation/stack": "^6.0.6", "react-native-screens": "3.6.0",Update: I tested on version
"react-native-screens": "2.18.1"and it fixed. The issue started with V3 of react-native-screens.Update 2: Using
'@react-navigation/native-stack'instead of'@react-navigation/stack'on V6 with react-native-screens version 3.6.0 solved the problem for me as well.
Thank you for the "react-native-screens": "2.18.1" It saves my month long headache. I've tried @react-navigation/native-stack but it generates other issues, so I would install the 2.18.1. I don't know what they did, but the following 3.0.0 version causes the freezing.
I don't know why it's been nearly 2 years, the bug still remains. Doesn't anybody else have this problem?
for me helped add screen options for both screens
options: { animationEnabled: false, animation: 'none', }
any update?