UNPKG

@inkline/paper

Version:

Paper is a unified interface for defining components for Vue and React using a single code base.

13 lines (12 loc) 241 B
import { useState } from "react"; export const ref = (initialValue) => { const [state, setState] = useState(initialValue); return { get value() { return state; }, set value(value) { setState(value); } }; };