Lesson

Lock an Animation within the Screen Dimensions in React Native

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.

Duration
4 min
Access
Free
Transcript
Available

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.