const valueX = useRef(new Animated.Value(0)).current
useEffect(() => {
Animated.timing( valueX , {
toValue : // How to get the original X position of the component here.
duration : 1000,
easing : Easing.linear
}).start()
}, [])
So, I have a component (i.e View) originally at some position on the screen. I wanted to have a slight animation there using react native animated API. What I want is to move X position of that view from 0 to its original position . How can it be done?