Below are two React Components that do almost the same thing. One is a function; the other is a class. Each Component has an Animated.Value with an asy
Animated.Value
You can use useRef hook (it's the recommended way stated in docs):
const a = useRef(5) // 5 is initial value
a.current
a.current = my_value