Skip to content

Commit 441a011

Browse files
authored
Remove incorrectly passed gestureEvents (#3799)
## Description After #3732 using new API results in a crash, as there's no longer `gestureEvents` field defined on `Gesture` type. <img width="689" height="41" alt="image" src="https://github.com/user-attachments/assets/b7e5bc87-f783-41c9-be91-61dd235384d8" /> This PR fixes this behavior. ## Test plan <details> <summary>Tested on the following example:</summary> ```tsx import React from 'react'; import { StyleSheet, View } from 'react-native'; import { GestureDetector, GestureHandlerRootView, usePan, } from 'react-native-gesture-handler'; export default function EmptyExample() { const pan = usePan({}); return ( <GestureHandlerRootView style={styles.container}> <GestureDetector gesture={pan}> <View style={{ width: 300, height: 300, backgroundColor: 'green' }} /> </GestureDetector> </GestureHandlerRootView> ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', }, }); ``` </details>
1 parent 83110b2 commit 441a011

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native-gesture-handler/src/v3/detectors/NativeDetector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function NativeDetector<THandlerData, TConfig>({
2929
gesture.detectorCallbacks.onGestureHandlerStateChange
3030
}
3131
// @ts-ignore This is a type mismatch between RNGH types and RN Codegen types
32-
onGestureHandlerEvent={gesture.gestureEvents.onGestureHandlerEvent}
32+
onGestureHandlerEvent={gesture.detectorCallbacks.onGestureHandlerEvent}
3333
// @ts-ignore This is a type mismatch between RNGH types and RN Codegen types
3434
onGestureHandlerTouchEvent={
3535
gesture.detectorCallbacks.onGestureHandlerTouchEvent

0 commit comments

Comments
 (0)