Screen unresponsive to touch when using tab navigator
Sorry, but my project is quite complicated so I can't isolate a test case.
I noticed that when upgrading from alpha.16 to alpha.19, the screen becomes unresponsive to touch when tabbing between views using the tab navigator on iOS. After toggling through several tabs the screen once again becomes responsive. Each of my tab navigators has nested stack navigators (not sure if that's relevant)
Hope this helps uncover an issue.
I've been experiencing this as well when using react-native-screens and react-navigation TabNavigator. I'm also using react-native-gesture-handler for buttons but as the screencast below shows it also happens with TouchableOpacity as well.
Here is a minimal reproduction of the bug w/ screencast: https://github.com/hanse/screens-bug-repro.
When first entering the "Profile" tab the buttons are responsive as expected and you'll see the Alerts popping up. But when you go to the first tab and then back to the second they are no longer responding to the touches. By commenting out useScreens it works as intended.
Merry Christmas! ππ π»
I also noticed this issue in a largeish app when updating to 3.x react navigation. I installed the gesture handler library as well as react native screens to check it out, but immediately noticed the app freezing pretty frequently while switching between views. I have a stack nav containing a tab navigator where each screen is a react component, and the rest of the sub-screens are in the top-level stack navigator. Opting out of react screens seems to fix the issue. This happens in both development and release versions.
Iβm really excited for this library to work more stably, because itβs going to boost android experience a ton!
Totally the same phenomenon. Resolved by
// useScreens();
or
useScreens(false);
https://github.com/react-navigation/react-navigation-tabs/issues/83

| software | version |
|---|---|
| ios or android | ios (Android does not occur) |
| react-native | 0.55.4 |
| react-navigation-tabs | 1.0.2 |
| react-native-screens | 1.0.0-alpha.16 |
I would like to know what will happen if I do not useScreen.
I am also facing the same issue.
I'm facing this since I enabled react-native-screens as well. Whats weird is that it happens on a single tab only for me. I have some similar tabs that never broke so far even though they have almost the same content. (They all have TouchableOpacity components everywhere..)
I am using back 1.0.0-alpha.17 for now, had the same issue with alpha.19
here is my dependencies
"dependencies": {
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-gesture-handler": "^1.0.12",
"react-native-screens": "1.0.0-alpha.17",
"react-navigation": "3.0.9"
},
"resolutions": {
"**/react-native-screens": "1.0.0-alpha.17"
},
Thank you all for reporting and especially @hanse for coming up with a repro app β it was very helpful!
I managed to locate a bug, fixed it and published alpha.21 with the fix included. Please try it out and let me know if you still experience the issue
Looks like it is working well now with your fix, thank you !
@kmagiera This is still going on in alpha.21. Here's is a snack: expo-snack
To test, I just continually switch tabs, check for scrolling and soon a tab screen will become unresponsive. However, I could only duplicate this on the physical device.
@townmulti I tried to reproduce it, but I did not have it. Are you sure it is the same and coming from react-native-screens ?
Last time, the issue was created in only a few clicks (only going to another tab and the tab was frozen forever)
@townmulti The fix required native code changes so if you are using expo it isn't sufficient to install javascript bit via npm. I'll talk with expo and ask if they could pull in native code changes. In the meantime if you have a standalone RN app you can try it there and see if the problem still persist
actually got an info from @tsapeta that native changes from alpha.21 will be included in the next expo patch release that is already in review and should be available soon
@kmagiera @tgensol thanks! ...will test it again after update!
issue is still present, re-opened here with easy repro snack
Happening for me on alpha-23 with react-navigation 3.11 with a custom tab navigator that keeps multiple Screens active (so the animation can show)
I am still facing this issue but I am not using useScreens from react-native-screens anywhere in my project Facing this issue on react-navigation v5
@bhattanmol101 have you managed to find a solution? This bug is driving me crazy!
@thife455
I don't know if it's a solution or not but this is what I did.
I read the above comments that useScreens should not be used or should be false but I was not using useScreens function at all anywhere in my code but I had that react-native-screens dependency in my package.json.
Also, the useScreens function has been deprecated in the recent version so after searching a little bit the useScreens function has been renamed to enableScreens function.
As the above comment said that useScreens should be false I used enableScreens(false) in my App.js before defining the class but that didn't work, much to my surprise writing enableScreens(true) made it work. I don't know what is the real issue but with enableScreens(true) it worked.
The below screenshot shows how I have used it in my App component. App component renders just the stack navigator in which one of the routes has bottom tabs in it, so as soon as the user logs in it goes to tab navigation.

@bhattanmol101's solution worked for me.
Nothing works for me