UNPKG

337 BJavaScriptView Raw
1import * as React from 'react';
2import { Animated } from 'react-native';
3export default function useAnimatedValue(initialValue) {
4 const lazyRef = React.useRef();
5
6 if (lazyRef.current === undefined) {
7 lazyRef.current = new Animated.Value(initialValue);
8 }
9
10 return lazyRef.current;
11}
12//# sourceMappingURL=useAnimatedValue.js.map
\No newline at end of file