mobile-animation-reanimated
React Native Reanimated Patterns
Quick Guide: Reanimated 4 is New Architecture only (requires
react-native-workletsas a separate dependency). UseuseSharedValue+useAnimatedStylefor all animations. Animations run on the UI thread via worklets -- never block the JS thread. UsewithSpring(physics-based) orwithTiming(duration-based) for transitions, layout animations (entering/exiting) for mount/unmount, anduseScrollOffset(renamed fromuseScrollViewOffset) for scroll-driven animations. Reanimated 4 also introduces CSS animations/transitions as a declarative alternative to the worklet API.
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use Animated components (Animated.View, Animated.Text, etc.) for any animated styles -- passing animated styles to regular components causes errors)
(You MUST keep static styles in StyleSheet.create and only animate dynamic properties in useAnimatedStyle -- animating static values wastes UI thread resources)
(You MUST NOT mutate shared values inside useAnimatedStyle callbacks -- read only, or you cause infinite loops)
(You MUST use react-native-worklets as a separate dependency in Reanimated 4 -- the worklet Babel plugin moved from react-native-reanimated/plugin to react-native-worklets/plugin)