Vote count: 0
so basically im trying to get this render function to actually update the value in real time (as of now it just jumps to the final value upon completion of the animation)
this.state = {
pleaseDisplayMe: Animated.value(0);
}
triggerAnimation(){
Animated.timing(
this.state.pleaseDisplayMe,
{toValue: 100,
duration: 5000}
).start();
}
render(){
return <Animated.Text>{this.state.pleaseDisplayMe}</Animated.Text>
}
I feel like because this library can animated values under the hood then there must be a way to display whats happening. Or is there some sort of content/value property I can feed in through style?
I've tried custom writing my own setInterval function, but I need it to line up better with other Animations' timing and I'd love access to RN's Easing library!
thanks!
asked 19 secs ago
Trying to Animate React Native Text Value
Aucun commentaire:
Enregistrer un commentaire