In this lesson we'll use Animated.ValueXY and Dimensions to create an animated element that cannot be animated outside of the screen dimensions. It takes advantage of the extrapolate: "clamp" feature of interpolate.
Animated.ValueXY
Dimensions
extrapolate: "clamp"
interpolate