rn-reanimated
Installation
SKILL.md
React Native Reanimated — Best Practices & 60fps Guide
Reanimated 4.x / Worklets 0.7.x / React Native 0.80+ (New Architecture required)
Critical Rules
- Babel plugin must be LAST in
babel.config.jsplugins array. - Never use React state (
useState) for values that drive animations. UseuseSharedValue. - Never call
withTiming/withSpringinside gesture.onUpdatecallbacks. Assign the event value directly for smooth tracking; use spring/timing only in.onEnd. - Always cancel animations before starting new ones when gestures begin:
cancelAnimation(sv). - Always pass
velocityfrom gesture events intowithSpringfor natural feel. - Always wrap the app in
<GestureHandlerRootView style={{ flex: 1 }}>. Gestures won't work without it. - Always cancel animations on unmount via
useEffectcleanup. - Respect reduced motion — use
ReduceMotion.SystemoruseReducedMotion().
Code Review & Upgrade Action
When the user asks to review, check, audit, or upgrade their Reanimated code, follow this procedure:
Related skills