Gesture Handler (RNGH) moves touch recognition to the native layer so pans, pinches, and multi-touch compositions stay at 60fps. On Expo SDK 57, install it alongside Reanimated 4 and drive animated values from gesture callbacks on the UI thread.
Add GestureHandlerRootView to root layout. Ensure Reanimated Babel plugin is last.
Why use Gesture.Pan instead of PanResponder?
RNGH recognizes on the native thread with better scroll handoff.
API composes cleanly (Simultaneous, Race) and integrates with Reanimated worklets.
What is activeOffsetX for?
The finger must move horizontally by N pixels before the pan activates. This lets vertical scroll win when the user scrolls a list containing swipeable rows.
Can I attach multiple gestures to one view?
Yes - build one composed gesture and pass it to a single GestureDetector. Do not nest multiple detectors on the same view without a composition plan.
Should FlatList come from RNGH or react-native?
Start with RN FlatList. Switch the inner horizontal list to RNGH FlatList when nested scroll gestures fail on Android (Nested Scrollables).
How do gestures interact with Expo Router stacks?
Stack swipe-back is a native gesture. Custom full-screen pans may need gestureEnabled: false on the screen or careful simultaneousWithExternalGesture - see Gesture Conflict Resolution.
Do I need react-native-reanimated for gestures?
Not strictly for recognition, but every high-frequency UI update should use Reanimated shared values. setState per pan frame will jank.