react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Update how Gesture Handler exposes `setGestureState` to the Reanimated UI runtime

Open j-piasecki opened this issue 1 year ago • 1 comments

Description

Changes how setGestureState is exposed to the UI runtime. Instead of the weird conditionally adding Reanimated as a dependency on Android and the weird cast on iOS it uses _WORKLET_RUNTIME const injected by Reanimated into the JS runtime. This allows Gesture Handler to decorate the UI runtime without direct dependencies between the libraries.

TODO:

  • look more closely at conditionally adding Reanimated as a dependency on Android as it does more than just handle setGestureState
  • restore FabricExample to the state from before this PR

[!CAUTION] This works only on the New Architecture (and breaks the old one)

Test plan

TODO

j-piasecki avatar Nov 12 '24 16:11 j-piasecki