React Native animations revisited — Part II

Amazing Animated API

state = {    
growAnimation: new Animated.Value(0),
};
Animated.timing(
this.state.growAnimation,
{
toValue: 1,
duration: 3000,
easing: Easing.linear,
}
).start((animation) => {
if (animation.finished) {
this.spin();
}
});
transform: [        
{
rotate: this.state.growAnimation.interpolate({
inputRange: [0, 1],
outputRange: ['0deg', '360deg'],
}),
},
]

--

--

We are React Native community-trusted, extremely skilled Javascript developers ready for hire for your next React Native and React project, now.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michał Chudziak

Independent web and mobile development consultant with almost a decade of professional experience building apps at scale. React Native Open Source contributor.