React Native Animations Revisited - Part I

Almost every modern app contains dynamic UI elements. When it comes to animating React Native components, the platform gives us many useful APIs. Animations are something that can be quite confusing for new developers, so I would like to make life easier for all of you who are struggling with those.

This is a series consists of 3 topics:

LayoutAnimation

First approach I would like to talk about is the easiest one. LayoutAnimation comes with simple and easy API, and allows us to animate transitions between layout changes.

Let’s start from defining our scene which will contain a clickable blue square in the middle. With each click square’s edge length is multiplied by two. Now when we click on this square it looks like this:

clickable square in react native

Thats our code:

But what happens when we sprinkle some LayoutAnimation magic:

Take a look:

clickable square in react native with layoutanimation

Let’s talk about what just happened — LayoutAnimation provides .configureNext() function which allows us to specify look of next transition.

componentWillUpdate() {
LayoutAnimation.configureNext(animationConfig);
}

This function takes one argument which is the config object. It allows us to customize duration, and behavior of create, update, and delete animations. Each of those hooks supports multiple animation types and name of animated property like opacity or scaleXY.

{
duration: 700,
create: {
type: 'linear',
property: 'opacity',
},
update: {
type: 'spring',
springDamping: 0.4,
property: 'scaleXY',
},
delete: {
type: 'linear',
property: 'opacity',
},
}

This might be quite complicated, and I’ve promised you that it is going to be super simple. LayoutAnimation comes with some predefined presets which can help us a bit.

We just used the first one which is .spring(), besides that one we also have .linear() and .easeInEaseOut(). They are just calls over the .configureNext() function which is also exposed for us, the only difference is that it accepts config which is predefined in previous functions. You customize things like duration, or differences between create and update animations within your config object. You can read more about configuration on HubSpot document.

As you can see LayoutAnimation is amazing when it comes to simple animations.

Insights

Learn more about Animations

cover

Jul 8Podcast

React Native Ease: Platform-Native Animations Without the Extra Work

Łukasz talks with Janic from App & Flow about React Native Ease, Core Animation, Reanimated trade-offs, and performant UI animation in React Native.

cover

Jul 7Podcast

Where Reanimated Goes Next

A conversation with Bartłomiej Błoniarz on CSS animations in Reanimated, native primitives on iOS, shared element transitions, and the work still left on stability.

cover

Oct 30Live Stream

Reanimated, TanStack, Cross-Pollinating Languages & TWIR #256 Anniversary

Catch up on everything from TanStack updates and Astro insights to Reanimated deep dive and even Swift for Android. Plus, we celebrate the 256th newsletter!

Events Cover

Apr 16Talk

How to Make Your React (Native) App Feel Native

How to make your React Native app feel truly native, across iOS, Android, tvOS & more. Dive into best practices, navigation, and react-native-bottom-tabs.

cover

Feb 19Podcast

Reanimated 4 is the Future of Smooth React Native Animations

Reanimated 4 is now available in beta, and if you work with animations in React Native, you need to know what’s new!

cover

Oct 11Article

A Deep Dive Into React Native Reanimated v1

Read the article to learn more about what React Native Reanimated is, how it works under the hood, and what idea stands behind the library.

cover

Apr 15Article

ReanimatedArc - Build Circular Animated UI Elements in React Native

Build good-looking and smooth animated arcs in React Native with ReanimatedArc library.

cover

Oct 25Article

Custom Screen Transitions in React Navigation

Wondering how to custom a screen transition animation in React Navigation? Check this step-by-step guide.

cover

Aug 8Article

Reanimating Your React Native Experience

Read how to achieve delightful developer experience with react-native-gesture and react-native-animated.

cover

Jan 17Article

React Native Animations Revisited - Part III

Learn how to respond to screen gestures with PanResponder. Check the last part of our Callstack series on React Native animations!

cover

Jan 10Article

React Native Animations Revisited - Part II

In this part of the three-part guide about animations in React Native we cover creating animations with Animated API.

cover

Mar 19Tutorial

The Hard Way vs. The React Native AI SDK Way: Stop Writing Custom Modules for Every Model

Learn how React Native AI uses a unified provider model to switch between cloud and on-device LLMs without rewriting application logic, enabling reliable AI experiences online and offline.

cover

Mar 12Tutorial

Build Smarter Apps: Tool Calling & AI Orchestration Explained

Learn how on-device models in React Native can call tools, interact with external APIs, and return structured outputs you can use directly in application logic.

cover

Mar 5Tutorial

MLC LLM + React Native: On-Device AI Without the Pain

Learn how to run third-party on-device LLMs in React Native using MLC LLM. Choose your models, run them efficiently across platforms, and keep a unified JavaScript API with React Native AI.

cover

Feb 24Tutorial

Intelligent Fallbacks with Apple Intelligence in React Native

Learn how to use Apple’s built-in Foundation Models in React Native apps, reduce memory usage, and enable fast, fully on-device AI with React Native AI Apple.

cover

Feb 10Tutorial

What Is the React Native AI SDK? A Complete Intro & Quickstart

Learn why on-device AI matters for React Native apps, how local LLMs behave offline, and what problems React Native AI is designed to solve from day one.

cover

Jan 29Tutorial

Implementing an Android TurboModule with Kotlin

Learn how to implement a React Native TurboModule on Android, from the TypeScript spec and Codegen to the Kotlin implementation and package registration.

cover

Jan 19Tutorial

Working with Different Threads in Swift TurboModules

Learn how JavaScript, native module, background, and main threads interact in React Native TurboModules, and how to use GCD queues to run async work safely in Swift.

cover

Jan 9Tutorial

How to Add Type-Safe Constants to Swift TurboModules

Learn how to expose typed, immutable constants from a Swift TurboModule using Codegen, and get full end-to-end type safety between native and JavaScript.

cover

Dec 30Tutorial

Adding Event Emitters to Your TurboModule in Swift

Learn how to emit native events from a Swift TurboModule and subscribe to them in JavaScript, including proper memory management and Codegen integration.

cover

Dec 22Tutorial

Writing Your First TurboModule in Swift

Learn how to build a fully working TurboModule in Swift, integrate it with Codegen, and bridge it through Objective‑C inside an Expo app.