I am concerned about the proper way of using react-native-gesture-handler, the documentation says that Gesture Handlers are deprecated and I should be using GestureDetector, the context is that I need to combine gestures, and when I try to do it this way
const gesture = useMemo(() => Gesture.Tap().onStart(() => {}), []);
const gesture2 = useAnimatedGestureHandler<PanGestureHandlerGestureEvent>({
onStart: () => {},
});
const combined = Gesture.Exclusive(gesture, gesture2);
return (
<GestureDetector gesture={gesture}>
<Animated.View style={styles.button} disabled={disabled} android_disableSound>
<Animated.View style={styles.ripple} />
<Text style={styles.text}>{children}</Text>
</Animated.View>
</GestureDetector>
);
this is a no-go because I get a red underline under gesture2 saying
Argument of type 'OnGestureEvent<PanGestureHandlerGestureEvent>' is not assignable to parameter of type 'Gesture'.ts(2345)
Is there still a valid use case for useAnimatedGestureHandler or should I consider it deprecated?
Thanks