react-native-gesture-handler
react-native-gesture-handler copied to clipboard
Update how Gesture Handler exposes `setGestureState` to the Reanimated UI runtime
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