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