software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

Update how gesture handler exposes `setGestureState` to the ui runtime #3207

Open j-piasecki opened 1 week ago

j-piasecki commented 1 week ago

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:

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

Test plan

TODO