Complete the code to import the spring animation function from React Native Reanimated.
import { [1] } from 'react-native-reanimated';
The spring function is used to create spring animations in React Native Reanimated.
Complete the code to start a spring animation on the shared value 'progress'.
progress.value = [1]({ toValue: 1 });
The spring function animates the value with spring physics towards the toValue.
Fix the error in the decay animation code by completing the missing function call.
progress.value = [1]({ velocity: 1000 });
The decay function animates the value with a decay effect based on velocity.
Fill both blanks to create a spring animation with a custom damping and stiffness.
progress.value = spring({ toValue: 1, damping: [1], stiffness: [2] });Damping controls how bouncy the spring is; stiffness controls how stiff the spring feels. Common values are damping=15 and stiffness=50 for smooth animation.
Fill all three blanks to create a decay animation with a velocity, clamp the value between 0 and 100.
progress.value = decay({ velocity: [1], clamp: [[2], [3]] });The decay animation starts with a velocity of 1000 and clamps the value between 0 and 100 to prevent it from going out of bounds.