Make it bounce: useSpring
Unlock this video and the rest of this course by joining Frontend.FYI PRO .
When an animation is tied into a user interaction, it sometimes feels more natural to not have an transition on that animation. That is why out of the box there’s no transition on a useMotionValue
value.
For all other cases, we can use the useSpring
hook. This hook takes in a motion value and a spring configuration, allowing you to control how this value should change.
Unlock the full lesson with PRO
Want to read the full lesson? Join Frontend.FYI PRO.
PRO is a one time purchase of €249 that gives you lifetime access to this course, any courses released in the future, and so much more!