Duration
6 min
Access
Pro
Transcript
Available

In this lesson, you'll learn how to implement smooth image scrolling using React Spring's useSpring hook

You will use an onMouseMove event to get the image and mouse coordinates and set useSpring with the offset. You can then style the animated element with the backgroundPositionX and backgroundPositionY CSS properties.