Complete the code to create a new animated value starting at 0.
const opacity = new Animated.[1](0);
Animated.Value is used to create a new animated value that can be changed over time.
Complete the code to animate the opacity value to 1 over 500 milliseconds.
Animated.[1](opacity, { toValue: 1, duration: 500 }).start();
Animated.timing animates a value over time with a duration.
Fix the error in the code to properly animate the value.
Animated.timing([1], { toValue: 100, duration: 300 }).start();
The first argument to Animated.timing must be an Animated.Value instance, like 'opacity'.
Fill both blanks to create an animated style that changes opacity using the animated value.
const animatedStyle = { opacity: [1] };
<View style={ [2] }></View>The opacity style uses the animated value variable, and the style prop receives the animated style object.
Fill all three blanks to create and start an animation that moves a view horizontally from 0 to 150 over 700ms.
const translateX = new Animated.[1](0); Animated.[2](translateX, { toValue: [3], duration: 700 }).start();
Animated.Value creates the animated number, Animated.timing animates it, and toValue sets the target position.