Closed
Description
Description
PinchGestureHandler is not supported?
Code
const Test: FunctionComponent = () => {
const onGestureEvent = useAnimatedGestureHandler({
onActive: () => {
console.info('active');
},
});
return (
<PinchGestureHandler onGestureEvent={onGestureEvent}>
<Animated.View >
</Animated.View>
</PinchGestureHandler>
);
};
typescript error
No overload matches this call.
Overload 1 of 2, '(props: Readonly<PinchGestureHandlerProperties>): PinchGestureHandler', gave the following error.
Type 'OnGestureEvent' is not assignable to type '(event: PinchGestureHandlerGestureEvent) => void'.
Types of parameters 'event' and 'event' are incompatible.
Type 'PinchGestureHandlerGestureEvent' is not assignable to type 'PanGestureHandlerGestureEvent'.
Types of property 'nativeEvent' are incompatible.
Type 'GestureHandlerGestureEventNativeEvent & PinchGestureHandlerEventExtra' is not assignable to type 'NativeEvent'.
Type 'GestureHandlerGestureEventNativeEvent & PinchGestureHandlerEventExtra' is missing the following properties from type 'PanGestureHandlerEventExtra': x, y, absoluteX, absoluteY, and 4 more.
Overload 2 of 2, '(props: PinchGestureHandlerProperties, context?: any): PinchGestureHandler', gave the following error.
Type 'OnGestureEvent' is not assignable to type '(event: PinchGestureHandlerGestureEvent) => void'.
Package versions
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-gesture-handler": "1.7.0",
"react-native-reanimated": "2.0.0-alpha.5",