I was following the code from react native documentation for using Animated API here
I got an error while using this line
const scrollY = useRef( new Animated.value(0)).current;
ERROR : TypeError: undefined is not a constructor (evaluating 'new _reactNative.Animated.value(0)')
I have imported Animated from
import { Animated } from "react-native";
I don't know what I have done wrong, I am using the same code from the documentation
It's:
const scrollY = useRef( new Animated.Value(0)).current;
Not
const scrollY = useRef( new Animated.value(0)).current;
From v to uppercase V
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With