React Native Reanimated: Off-Thread Animations

Reanimated moves animations off the busy JavaScript thread onto the native UI thread. This ensures smooth, 60-120 fps performance for gestures and transitions, even during heavy JS computation.
Why it exists
Standard React Native animations run on the same JavaScript thread as your app's logic. If that thread is busy calculating state changes or processing data, your animation will stutter and drop frames, leading to a janky user experience. Reanimated was created to solve this by decoupling animation logic from the JS thread.
The mental model
Think of your app having two main workers: a JavaScript worker and a UI worker. Normally, the JS worker has to tell the UI worker what to do for every single frame of an animation. If the JS worker gets busy, it can't give instructions fast enough. Reanimated lets you give the UI worker a complete set of instructions upfront, like "animate this from A to B over 500ms," so it can execute the entire animation smoothly on its own without constantly checking back with the busy JS worker.
How it works
Reanimated uses a declarative API and special hooks. You define animated values using useSharedValue. These are special objects whose .value property can be read and written from both the JavaScript thread and the UI thread. You then define animation logic inside functions marked as "worklets" (often implicitly, like in useAnimatedStyle). Reanimated sends this worklet code to the native UI thread, where it can run independently, updating styles or properties directly without crossing the React Native bridge on every frame. This is what enables 60-120 fps performance.
When to use it
Use Reanimated for any animation where performance and a native feel are critical. This includes: first, user-driven gestures like dragging, swiping, and pinching, which require immediate feedback; second, complex layout animations where items are added, removed, or reordered; and third, any animation that needs to run smoothly while the app is doing heavy lifting on the JS thread.
When not to use it
For very simple, one-off animations that are not interactive (like a simple fade-in on a static screen), the built-in Animated API might be sufficient and require less setup. Reanimated introduces its own concepts like shared values and worklets, so for trivial cases, it can be overkill. However, most modern apps with rich interactions benefit from using Reanimated as the default.
One canonical example
A common use case is creating a button that smoothly changes its width on press. You would initialize a shared value: const width = useSharedValue(100);. The press handler would update this value with an animation helper: width.value = withSpring(width.value + 50);. Finally, an Animated.View component would use an animated style to link its width directly to the shared value. The withSpring function and the style update all run on the UI thread, ensuring a fluid animation.
Interview question
What is the primary reason to choose React Native Reanimated for animations involving user gestures or heavy JS computation?
- a.It simplifies the creation of complex animation sequences with fewer lines of code.
- b.It ensures that all animation calculations are performed exclusively on the JavaScript thread for better debugging.
- c.It allows animation logic to execute independently on the native UI thread, preventing stuttering.Correct
- d.It provides a more extensive set of pre-built animation components and effects.
Why? this is the answer
The card explicitly states that Reanimated moves animation logic off the JavaScript thread onto the native UI thread, allowing animations to run smoothly at 60-120 fps even when the JS thread is busy. Option A is incorrect because the card mentions Reanimated introduces its own concepts, implying it's not always simpler, and its core benefit is performance, not code brevity.
Just read this? Test yourself on what you have been reading.
Read the original → docs.swmansion.com
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on react native — each one lists the topics its interview covers.
See open roles