iOS: All reanimated gestures sometimes don't work after app launch
See original GitHub issueDescription
Sometimes all reanimated gestures don’t work after app launch, including PanGestureHandler onGestureEvent
and Animated.ScrollView onScroll
.
Expected behavior
Everything always works.
Actual behavior & steps to reproduce
Sometimes on app launch nothing from reanimated works.
Snack or minimal code example
Not sure what to add here because we have lots of reanimated code.
return (
<PanGestureHandler
enabled={isActive}
activeOffsetX={ACTIVE_OFFSET_X}
onGestureEvent={onGestureEvent} // this is never called
>
<Animated.View style={[styles.container, currentItemAnimatedStyle]}>
{renderItem(item, index, currentIndex, isActive)}
<Animated.View
pointerEvents="none"
style={[styles.likeLabel, likeLabelStyle]}
>
<Image source={Images.swiperActions.likeBanner} />
</Animated.View>
<Animated.View
pointerEvents="none"
style={[styles.dislikeLabel, dislikeLabelStyle]}
>
<Image source={Images.swiperActions.dislikeBanner} />
</Animated.View>
</Animated.View>
</PanGestureHandler>
);
Package versions
- React Native: 0.63.4 - 0.66.1
- React Native Reanimated: 2.2.2 - 2.3.0-beta.2
- NodeJS: v14.17.6
- Xcode: 12.5.1
Affected platforms
- Android
- iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Turn on and practice VoiceOver on iPhone - Apple Support
Learn and practice VoiceOver gestures · Go to Settings > Accessibility > VoiceOver. · Turn on VoiceOver, tap VoiceOver Practice, then double-tap to...
Read more >onGestureEvent not being called when I try to move a box with ...
I've started react native project from scratch, installed react reanimated 1. I've pushed the repository: ...
Read more >Troubleshooting | Stream Chat - React Native SDK Docs
When you return to the original screen you need to reset the thread to ensure it is not being set on the messages...
Read more >React Navigation 6.0
Let's talk about the highlights of this release in this blog post. ... While this works for a lot of apps, apps with...
Read more >Reanimating Your React Native Experience | blog {callstack}
event we could map gesture state to the position of the box and make this whole interaction run on UI thread with useNativeDriver...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having similar issue on ios only and only after JS thread restart when different js modules (still using reanimated2 and pan gesture handler) are loaded next time. useAnimatedGestureHandler does not call anything but a simple callback function as onGestureEvent works fine. valid for 2.2.0 and 2.2.4…
@piaskowyk we used patch to fix that, i guess taken from some PR, and it helped.
If this PR was merged I guess latest version should also fix it, but I didn’t test it.
react-native-reanimated+2.2.4.patch