O'Reilly logo

React Native - Building Mobile Apps with JavaScript by Vladimir Novick

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

Combining several animations to create complex sequences

We saw that animations can be complex using LayoutAnimation or Animated, but they can become even more complex with the power of creating sequences of animations and running them in parallel. Let's take a look at the following animation and see exactly how it is implemented:

We want the following animation: after delay of 200ms, we will change animatedValue to 1 by using the timing function

timing( this.state.animatedValue, { toValue: 1 })

then wait for 200ms and will change it to 2 by using the following timing function:

timing(  this.state.animatedValue, { toValue: 2 })

Our opacity ...

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