animations
Installation
SKILL.md
Animations
Software Mansion's production animation patterns for React Native on Reanimated 4 and the New Architecture.
Load at most one reference file per question. For API signatures and config options, webfetch the documentation pages linked in each reference file.
Version Check
Read the installed Reanimated version before writing animation code: node_modules/react-native-reanimated/package.json or the lockfile, not the package.json range. Reanimated 3.x has no CSS transitions or animations; use shared values there. On 4.x, a feature used below the version that added it (table in animations.md) is silently ignored or throws: do not emit it, and if the user asked for that feature, say which version adds it.
Critical Rules
- NEVER use
runOnJS. It is removed in Reanimated 4. UsescheduleOnRN(fn, ...args)fromreact-native-workletsinstead. This applies everywhere: scroll handlers, gesture callbacks,useAnimatedReaction,useFrameCallback, and any other worklet context.