Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(worklet): fix workletization of touch event gesture callbacks (#2715
) ## Description Workletized touch event gesture callbacks were causing Reanimated errors to be thrown in RN 73 (Expo 50 beta). Not sure if this is a bug in RNGH or Reanimated, but moving the function definition outside of the object seems to fix the issue (sounds like a bug in the reanimated babel plugin if nested functions should be able to be workiletized?) Fixes software-mansion/react-native-reanimated#5555 This case was previously broken: ```tsx function Demo() { const panGesture = Gesture.Pan() panGesture.onTouchesMove((evt, mgr) => { 'worklet' console.log('move!!') }) return ( <GestureHandlerRootView style={{ flex: 1, backgroundColor: 'seashell' }}> <GestureDetector gesture={panGesture}> <Animated.View style={{ flex: 1 }} /> </GestureDetector> </GestureHandlerRootView> ) } ```
- Loading branch information