UNPKG

@aplus-frontend/antdv

Version:

Vue basic component library maintained based on ant-design-vue

15 lines (14 loc) 437 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = useState; var _vue = require("vue"); function useState(defaultStateValue) { const initValue = typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue; const innerValue = (0, _vue.ref)(initValue); function triggerChange(newValue) { innerValue.value = newValue; } return [innerValue, triggerChange]; }