Installation
React Native Skia works with Reanimated 3.0.0 and above:How It Works
React Native Skia automatically detects when you pass Reanimated shared values to component props. These values are read directly on the UI thread, enabling:- Zero bridge communication - No messages between JS and native
- 60+ FPS animations - Smooth performance even with complex graphics
- Automatic updates - Canvas re-renders when shared values change
- Worklet support - Run custom code on the UI thread
Shared Values in Props
Any Skia component prop can accept a shared value:Transforms
Animate transforms with shared values:Derived Values
Compute animated values based on other shared values:Path Interpolation
Smooth morphing between paths:Color Interpolation
Smooth color transitions:Text on Path Animation
Animate text following a path:Frame Callbacks
Run code on every frame:Worklets
Functions that run on the UI thread must be marked with'worklet':
Running on UI Thread
Explicitly run code on the UI thread:Animated Props Hook
While not necessary for basic usage, you can useuseAnimatedProps for complex scenarios:
Shader Uniforms
Animate shader uniforms:Performance Best Practices
Do’s
- ✅ Use shared values for high-frequency updates
- ✅ Use
useDerivedValuefor computed values - ✅ Mark worklet functions with
'worklet' - ✅ Batch related animations together
- ✅ Use
cancelAnimationto stop unused animations
Don’ts
- ❌ Don’t use
useStatefor animation values - ❌ Don’t trigger re-renders on every frame
- ❌ Don’t perform heavy computations in derived values
- ❌ Don’t forget to cleanup animations on unmount
- ❌ Don’t nest too many derived values
Debugging
Enable Reanimated debugging:Related
- Animations Overview - Animation fundamentals
- Gestures - Gesture-driven animations
- Hooks - Animation utilities
- Reanimated Docs - Official documentation