@devvie/bottom-sheet
Version:
The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀
20 lines (19 loc) • 720 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 = function () {
let initialValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
const animatedValue = (0, _react.useRef)(new _reactNative.Animated.Value(initialValue)).current;
return animatedValue;
};
var _default = exports.default = useAnimatedValue;
//# sourceMappingURL=useAnimatedValue.js.map