Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

j-piasecki
Copy link
Member

@j-piasecki j-piasecki commented Nov 12, 2024

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
  • 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)

Test plan

TODO

@j-piasecki j-piasecki requested a review from tomekzaw November 12, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant