O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running several animations at the same time

In this recipe we will learn how to use the same animation values in several elements. This way we will reuse the same values but by using an interpolation we will be able to get different values for other elements.

The animation will be similar to the previous recipe. We will have two clouds: one will be smaller with a slower movement, the other one will be a little bit bigger and will move faster. At the center of the screen we will have a static plane. We won't add any animation to the plane, but the moving clouds will create the illusion of movement.

Getting ready

Let's start this recipe by creating an empty app; we are going to call it MultipleAnimations. Feel free to use any other name, just make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required