You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?)
Fixessoftware-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>
)
}
```
0 commit comments