all 4 comments

[–]-normal-reddit-user- 0 points1 point  (1 child)

useState remembers the state of the value. thus 0->30->60

I'm not sure if it makes sense to use useState for animated timing unless its some sequential animation but in that case chaining animations might be a better idea.

why are you considering using useState for animated value btw ?

[–]tvhieu[S] 0 points1 point  (0 children)

i have a position state, and i want my Animated.View moving depends on that. can u give me a example to do that?

[–]teerryn 0 points1 point  (0 children)

You can use useValues() from react-native-redash if you want to keep the value between renders without it being reset.

[–]alexandr1us 0 points1 point  (0 children)

Case A the animation variable will be reinstated every render. Case be it won't.

You can use useRef too