rn-skia
Installation
SKILL.md
React Native Skia — Best Practices & Performance Guide
@shopify/react-native-skia 2.x / React Native >= 0.79 / React >= 19 / Reanimated v3+
Critical Rules
- Never read
.valuein JSX render — pass shared values directly as props:<Circle cx={x} />not<Circle cx={x.value} />. - Never create Skia objects in render — use
useMemofor Paint, Path, PictureRecorder, RuntimeEffect. - Always mark worklet functions with
"worklet"directive inuseDerivedValuecallbacks. - Animate properties, not structure — keep the component tree static; only animate numeric/color props.
- Use Atlas for 10+ similar elements — single draw call beats N individual components.
- Reuse Paint and PictureRecorder objects — creating per frame causes GC pressure and frame drops.
- Prefer retained mode for UI animations (near-zero FFI cost); use immediate mode (Picture API) only for variable draw command counts (particles, generative art, games).
- Use BlurMask over Blur for simple shapes — it's cheaper.
- Order filters cheapest-first — MatrixColorFilter before Blur.
- Load fonts/images at component level with
useFont/useImage— handle null loading state before rendering.
Version Compatibility
Related skills