@devvie/bottom-sheet
Version:
The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀
16 lines (14 loc) • 503 B
JavaScript
;
import { useRef } from 'react';
import { Animated } from 'react-native';
/**
* Convenience hook for abstracting/storing Animated values.
* Pass your initial number value, get an animated value back.
* @param {number} initialValue Initial animated value
*/
const useAnimatedValue = (initialValue = 0) => {
const animatedValue = useRef(new Animated.Value(initialValue)).current;
return animatedValue;
};
export default useAnimatedValue;
//# sourceMappingURL=useAnimatedValue.js.map