Any advice on how to animate a number? I’m working on an app that will show the user’s current points on the home screen. When the screen is focused, I’d like the points to count up from 0 to their current total point value, over a duration of 900ms, rendering the animated value in a Text component.
I’ve tried a number of things with React Native’s Animated API as well as with different options for storing and referencing the state, and nothing has worked for me so far. Anyone done this before or have ideas to help me get unstuck? Thank you all!
2
Answers
I’m new in react you can use React Spring for animating
examples
and maybe you need some thing like this
example
With ReAnimated 3 you can use a withTiming animation to set a shared value.
Display the value using
react-native-animateable-text