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
allow calling setGestureState from JS runtime?
address all TODOs from the code
restore FabricExample to the state from before this PR
RNGestureHandlerModule.kt begs for a refactor (another PR probably)
I guess we'll need a cpp formatter for Android
get rid of the console logs
figure out if it's possible to decorate the UI runtime without setTimeout
[!CAUTION]
This works only on the New Architecture (and breaks the old one)
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:
setGestureState
setGestureState
from JS runtime?RNGestureHandlerModule.kt
begs for a refactor (another PR probably)setTimeout
Test plan
TODO