In this recipe, we'll continue working with the LayoutAnimation class. Here, we will create a button, and when the user presses the button, we will show a loading indicator and animate the styles.
Creating a button with a loading animation
Getting ready
To get started, we'll need to create an empty app. Let's call it button-loading-animation.
Let's also create a Button folder with an index.js file in it for our Button component.
How to do it...
- Let's start with the Button/index.js file. First, we'll import all the dependencies for this component...