import { Ref , ref } from 'vue' ; export default function useState < T > ( defaultValue ? ) { const value = ref ( defaultValue ) as Ref < T > ; const setValue = ( newValue ) => { value . value = newValue ; } ; return [ value , setValue ] ; }