reanimated-skia-performance

Installation
SKILL.md

Reanimated + Skia Performance

Target stack: react-native-skia v3 (Graphite), react-native-reanimated 4.8+, react-native-worklets 0.14+.

Skia v2 note: @shopify/react-native-skia stops at v2.14. v3 publishes as react-native-skia and requires Reanimated 4 (react-native-worklets >= 0.7.0), Android API 26+ with Vulkan 1.1, and iOS 15.1+. Stay on react-native-skia@2 (OpenGL ES) only when you must support Android < API 26, non-Vulkan devices, Android TV, or Expo Go.

Defaults

  • Keep animation state off the JS thread: useSharedValue, useDerivedValue, worklets. Never read a SharedValue on the JS thread (blocking round-trip to UI thread).
  • Prefer shared.get() / shared.set() over shared.value (React Compiler safe). Use lazy init useSharedValue(() => ...) for expensive objects and shared.modify(...) for in-place array/typed-array updates.
  • Minimize JS↔UI crossings: use scheduleOnRN(fn, ...args) / scheduleOnUI(fn, ...args) from react-native-worklets (not deprecated curried runOnJS/runOnUI), and never per frame.
  • For Skia v3 <Canvas>, avoid per-frame React renders: pass SharedValues or select(sv, key) directly to Skia props/uniforms. The UI thread only writes updated values; a native thread pool replays Graphite frames.
  • Explicitly .dispose() (or use using) per-frame Skia NativeState objects (SkGraphiteRecording, offscreen images) inside UI/worklet loops; the UI runtime collects garbage rarely.

Choose the Renderer and Primitive

Installs
1.0K
GitHub Stars
24
First Seen
Jan 20, 2026