If I use withCallback function on animation enter/exit or even when using the keyframe to create custom animation I get an error. Am I doing something wrong, or maybe missing something?
"react-native-reanimated": "^2.3.1",
<Animated.View
entering={SlideInLeft.duration(animationDuration)}
exiting={SlideOutRight.duration(animationDuration).withCallback(()=>{})}
>
<View />
</Animated.View>
Fixed with
const slideInLeft = SlideInLeft.withCallback((finished: boolean) => {
'worklet';
if (finished) {
yourFoo(
}
});
<Animated.View entering={slideInLeft} >
...
</Animated.View>