Is there an intentional delay in TapGestureHandler? I notice after about 3 secs the onGestureEvent triggers the next animation.
const initialScale = useSharedValue(1);
const changeSize = useSharedValue(0.5);
const gestureHandler = useAnimatedGestureHandler({
onStart: () => {
changeSize.value = initialScale.value === 1 ? 0.5 : 1;
},
onCancel: (event) => {
console.log(event);
},
onEnd: () => {
initialScale.value = withSpring(changeSize.value);
},
});
//... More code
return (
<View style={styles.container}>
<TapGestureHandler onGestureEvent={gestureHandler} numberOfTaps={2}>
<Animated.View style={animatedPosition}>
<Animated.View style={[styles.card, animatedScale]} />
</Animated.View>
</TapGestureHandler>
</View>
);

Could you please include a snack or provide a small code example showing this behavior?
@jakub-gonet I added a gif for a visual. Were you able to see it?
Not the exact moment but I _think_ I see some small delay. I asked for repro because trying to do it on our own based on your snippet is time-consuming and not really efficient (as we're trying to write the same thing that you already have written).
Try to play around with props: https://docs.swmansion.com/react-native-gesture-handler/docs/handler-tap
Also, there is a bug in the current (alpha.5) useAnimatedGestureHandler. Try to use code from master or my handler to reproduce it.
@terrysahaidak you are a saviour 鉂わ笍
Did you try the code from master?
yeah, i tried your implementation of useAnimatedGestureHandler from your master, and it works fine
Could you also try the one from this repo master? if it works, we can close this issue then.
Looks like the problem has been resolved. We will close it for now but feel free to reopen anytime.