@inkline/paper
Version:
Paper is a unified interface for defining components for Vue and React using a single code base.
24 lines (18 loc) • 366 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ref = void 0;
var _react = require("react");
const ref = initialValue => {
const [state, setState] = (0, _react.useState)(initialValue);
return {
get value() {
return state;
},
set value(value) {
setState(value);
}
};
};
exports.ref = ref;