1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Lock an Animation within the Screen Dimensions in React Native

    reactReact

    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.