Gesture Handler
ELI5 — The Vibe Check
Gesture Handler replaces React Native's janky touch system with one that runs on the native thread. Swipes, pinches, long presses — all buttery smooth because they're not waiting for JavaScript to respond.
Real Talk
A React Native library (react-native-gesture-handler) that provides a declarative API for handling touch gestures using native drivers instead of the JS thread. It supports tap, pan, pinch, rotation, fling, and long press gestures with proper gesture composition and conflict resolution.
Show Me The Code
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
const pan = Gesture.Pan()
.onUpdate((e) => {
translateX.value = e.translationX;
translateY.value = e.translationY;
});
When You'll Hear This
"Use react-native-gesture-handler instead of the built-in touch system — it runs on the native thread." / "Combine Gesture Handler with Reanimated for 60fps interactive animations."
Related Terms
Animated API
React Native's Animated API lets you create smooth animations that can run on the native thread.
React Native
React Native lets you build iPhone and Android apps using React and JavaScript. It's like React put on a disguise and snuck into the App Store.
Reanimated
Reanimated is React Native's animation library on steroids.