The only time delay
is used is when combining with animations. Typically used in conjunction with sequence
to cause a delay before a second set of animations is run. This can also be used with super complex animations using sequence
and parallel
.
Like so
Animated.sequence([ Animated.timing(this.state.colorAnimation, { toValue: 1, duration: 500, }), Animated.timing(this.state.scaleAnimation, { toValue: 2, duration: 300, }), Animated.delay(1500), Animated.parallel([ Animated.timing(this.state.colorAnimation, { toValue: 0, duration: 500, }), Animated.timing(this.state.scaleAnimation, { toValue: 1, duration: 300, }), ]), ]).start();