Animated.Value can drive multiple properties in a synchronized fashion, but can only be driven by one mechanism at a time. Using a new mechanism (e.g. starting a new animation, or calling setValue) will stop any previous ones.
Typically initialized with useAnimatedValue(0); or new Animated.Value(0); in class components.
Reference
Methods
setValue()
setOffset()
setValue, an animation, or Animated.event. Useful for compensating things like the start of a pan gesture.
Parameters:
flattenOffset()
extractOffset()
addListener()
removeListener()
id param shall match the identifier previously returned by addListener().
Parameters:
removeAllListeners()
stopAnimation()
callback is invoked with the final value after stopping the animation, which is useful for updating state to match the animation position with layout.
Parameters:
resetAnimation()
interpolate()
AnimatedInterpolation.js
Parameters:
config object is composed of the following keys:
inputRange: an array of numbersoutputRange: an array of numbers or stringseasing(optional): a function that returns a number, given an input numberextrapolate(optional): a string such as ‘extend’, ‘identity’, or ‘clamp’extrapolateLeft(optional): a string such as ‘extend’, ‘identity’, or ‘clamp’extrapolateRight(optional): a string such as ‘extend’, ‘identity’, or ‘clamp’

