Skip to content

fix: migrate modal gestures and avoid render-time shared value reads#185

Open
PrajTS wants to merge 1 commit intobirdwingo:mainfrom
PrajTS:fix/gesture-handler-v2-and-reanimated-v3
Open

fix: migrate modal gestures and avoid render-time shared value reads#185
PrajTS wants to merge 1 commit intobirdwingo:mainfrom
PrajTS:fix/gesture-handler-v2-and-reanimated-v3

Conversation

@PrajTS
Copy link
Copy Markdown

@PrajTS PrajTS commented Mar 16, 2026

Summary

  • migrate the modal gesture handling from useAnimatedGestureHandler / PanGestureHandler to Gesture.Pan() with GestureDetector
  • wrap the modal content in GestureHandlerRootView so gesture handling works correctly when rendered inside a React Native Modal on Android
  • remove render-time shared value reads that trigger Reanimated warnings, including reaction dependency arrays and shared-value-backed state initializers
  • update Jest gesture mocks and interaction tests so the migrated gesture flow is covered by the existing suite

Why

The current modal gesture implementation relies on the older gesture handler API and can break when rendered inside Android modals. The package also reads Reanimated shared values during React render in several places, which triggers warnings on newer Reanimated versions.

Verification

  • npm run build
  • npm test -- --runInBand

Made with Cursor

Move modal gestures to GestureDetector with GestureHandlerRootView
so stories work reliably on Android modals.

Remove render-time shared value reads that trigger
Reanimated warnings across story components.

Update Jest gesture mocks and interaction tests so the
new gesture flow is covered by the existing test suite.

Made-with: Cursor
@PrajTS PrajTS marked this pull request as ready for review March 16, 2026 20:11
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