I’m upgrading from Expo SDK 38 to SDK 39 and noticed a problem with the Touchable component on my device (Android 10). It seems that the Touchable (and Pressable) component has a delay to start the UI feedback (both Ripple or something I did on onPressIn).
I don’t know which React Native version Expo SDK 39 uses, but it seems to be a problem introduced in 63.0.0 and fixed in 63.0.3. Please see this issue and the version changelog.
You can see the differences below:
Expo SDK 38
Expo SDK 39
I don’t know how to specify the Expo SDK version in a Snack, so I didn’t create one.
You can specify the SDK version in a snack on the bottom right of the screen.
But this is a known issue. I think it was fixed in the latest bugfix release.
If you run expo diagnostics you will see what react native version the Expo SDK is based on, but Expo can cherry pick fixes from later react native versions, and I think they did that in the case of this issue.
The issue you mentioned is similar but not the same. I managed to reproduce it on Snack. For the Ripple to be displayed in SDK 39 it is necessary to hold for a few moments (130ms if I am right about the cause), in SDK 38 it is instantly.
In both the React Native and the Expo SDK 39 bugfix release notes there is mention of removing a delay for TouchableOpacity.
I tried your Snacks and I think the problem is that in SDK 39 it seems that an onPress prop is needed for it to show the effect. If I add an onPress then it seems to work as expected. Does that fix it for you?
Also, please make sure you’re running the latest client (Expo app) on your device(s).
I’m having this trouble when trying to upgrade my app to SDK 39 both with TouchableNativeFeedback and Pressable, all my “buttons” have onPress, so it didn’t fix the delay. I really don’t know why this is happening and why I can’t reproduce it in Snack
You can see that the Pressability issue isn’t resolved in Expo if you go to node_modules/react-native/Libraries/Pressability/Pressability.js and see its code. If I apply the mentioned fix, everything works without any delay.
Is there any forecast to create a new patch (39.0.4)? Should I create an Issue to track this better?
Other weird things are happening, but then I need to debug it better, understand it and maybe open another topic.
PS: If you see the Issue I mentioned, you’ll notice that a unstable_pressDelay was created (see this commit) as a temporary workaround to delay onPressIn when the Pressable is inside a ScrollView. I don’t know if this should be patched together.