@devvie/bottom-sheet
Version:
The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀
19 lines (18 loc) • 638 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _reactNative = require("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 = (0, _react.useRef)(new _reactNative.Animated.Value(initialValue)).current;
return animatedValue;
};
var _default = exports.default = useAnimatedValue;
//# sourceMappingURL=useAnimatedValue.js.map