Learn REACT-NATIVE-REANIMATED with Real Code Examples

Updated Nov 26, 2025

Explain

Reanimated uses 'worklets'-JavaScript functions that run on a separate UI runtime for native-speed animations.

Animations run on the UI thread, not the JS thread, avoiding frame drops during heavy JS operations.

Provides declarative APIs, shared values, gestures, transitions, and layout animations.

Integrates deeply with react-native-gesture-handler for fluid interactive gestures.

Allows building complex animations with interpolation, timing, spring, derived values, and event-driven updates.

Core Features

useSharedValue and useAnimatedStyle

Timing, spring, and decay animations

Derived values for reactive logic

Gesture integration (Pan, Tap, etc.)

Layout animations (entering, exiting, transitioning)

Basic Concepts Overview

Shared Values - reactive animated state

Worklets - JS functions run on UI thread

Animated Styles - output of worklets

Animation Functions - timing, spring, decay

Derived Values - computed reactive values

Project Structure

App.js - root RN component

animations/ - reusable shared animations

components/ - animated UI components

hooks/ - custom animation hooks

gesture/ - gesture-handler logic

Building Workflow

Create shared values

Attach animated styles

Trigger animations via gestures or events

Run worklets on UI thread for smoothness

Use layout animations for transitions

Difficulty Use Cases

Beginner: simple fade-in animation

Intermediate: spring-driven draggable card

Advanced: full swipe/gesture carousel

Expert: custom bottom sheet with gestures

Architect: orchestrated multi-screen transitions

Comparisons

Reanimated vs Animated API -> Reanimated is native-driven

Reanimated vs Moti -> Moti is built on Reanimated, simpler API

Reanimated vs Lottie -> Lottie is for prebuilt animations, Reanimated is dynamic

Reanimated vs GSAP -> GSAP is JS-driven; Reanimated is native-driven

Reanimated vs Flutter animations -> Comparable but different architecture

Versioning Timeline

2020 - Reanimated 2 alpha released

2021 - Stable Reanimated 2 with worklets

2022 - Reanimated 2.5 major performance upgrades

2023 - Layout animations and transitions

2024–2025 - Reanimated 3 with TurboModules & Fabric support

Glossary

Worklet - JS function executed on UI thread

Shared Value - reactive animation state

Derived Value - computed animation state

UI Thread - native rendering thread

Gesture Handler - native gesture detection