"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = useState;
var _vueDemi = require("vue-demi");
function useState(defaultStateValue) {
  const initValue = typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;
  const innerValue = (0, _vueDemi.ref)(initValue);
  function triggerChange(newValue) {
    innerValue.value = newValue;
  }
  return [innerValue, triggerChange];
}