Creates a MotionValue that, when set, will use a spring animation to animate to its new state.
MotionValue
set
It can either work as a stand-alone MotionValue by initialising it with a value, or as a subscriber to another MotionValue.
Optional
const x = useSpring(0, { stiffness: 300 })const y = useSpring(x, { damping: 10 }) Copy
const x = useSpring(0, { stiffness: 300 })const y = useSpring(x, { damping: 10 })
Generated using TypeDoc
Creates a
MotionValuethat, whenset, will use a spring animation to animate to its new state.It can either work as a stand-alone
MotionValueby initialising it with a value, or as a subscriber to anotherMotionValue.