This is usage with react-native-reanimated.
I get this error:
Expected `onGestureHandlerStateChange` listener to be a function, instead got a value of `object` type.
Example:
const tapState = new Animated.Value(0);
const tapStateEvent = Animated.event([{ nativeEvent: { state: tapState } }]);
// ...
<TapGestureHandler onHandlerStateChange={tapStateEvent}>{...}</TapGestureHandler>
I'll plus one here. Getting the same thing on PinchGestureHandler
For future reference I was able to solve my problem by having the GestureHandler's immediate child changed to a reanimated Animated.View
Thank you !
@mnmaraes time saver !
In the event that using Animated.View does not fix this issue, double-check your imports. I was mistakenly importing Animated from react-native instead of react-native-reanimated.
Most helpful comment
For future reference I was able to solve my problem by having the GestureHandler's immediate child changed to a reanimated
Animated.View