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

Simple animations

In this recipe, we will learn the basics of animations. We will use an image to create a simple linear movement from the right to the left of the screen.

Getting ready

In order to go through this recipe, we need to create an empty app. We are going to call it SimpleAnimations. If you are not clear on how to create an empty app, please go to Chapter 1, Getting Started, and follow the steps in the first recipe.

We are going to use a PNG image; feel free to use any image that you want or download the one provided for this recipe, which is a nice image of a cloud.

How to do it...

  1. Let's create an  src folder at the root of the project. Inside this folder, we are going to need a MainApp.js file, where we are going to write all the code ...

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