withSpring({ value: Node, velocity: Node, state: Value, offset: Node, config, snapPoints: Node[], onSnap: (value) => void }): Node

Decorates animated value to spring when the gesture ends.

const translateX = withSpring({
value: translationX,
velocity: velocityX,
state,
snapPoints,
onSnap
});