This is how Animated api is declared in class component,
const pan = new Animated.ValueXY();
Where as in functional components,
const pan = useRef(new Animated.ValueXY()).current;
Source: React-Native official documentation
Will there be any caveats if we use Animated api without wrapping with useRef?