useValue
Deprecated: Use Reanimated’s useSharedValue instead.
The legacy useValue hook is deprecated in favor of Reanimated 3’s useSharedValue for better performance and features.
useComputedValue
Deprecated: Use Reanimated’s useDerivedValue instead.
The legacy useComputedValue hook is deprecated in favor of Reanimated 3’s useDerivedValue.
useLoop
Create looping animations with Reanimated:useTiming
Simplify timing animations:useSpring
Simplify spring animations:useAnimatedValue
Manage animated values with controls:useAnimatedPath
Animate between paths:useClockValue
Create time-based animations:useAnimatedSwitch
Toggle between two values:useSequence
Chain animations in sequence:useGesturePosition
Track gesture position:Cleanup Animations
Always clean up animations on unmount:Best Practices
- Always use
useSharedValuefor animation values - Use
useDerivedValuefor computed values - Clean up animations on component unmount
- Avoid creating new objects in derived values
- Use
cancelAnimationto stop running animations - Leverage
useFrameCallbackfor frame-based animations - Keep worklets pure and avoid side effects
Related
- Animations Overview - Animation fundamentals
- Reanimated Integration - Reanimated integration
- Gestures - Gesture-driven animations
- Textures - Animate React components as textures