yarn create vite
let msg = shallowRef({}) triggerRef(msg)
function MyRef<T>(value: T) { return customRef((track, trigger) => { return { get() { track() console.log('get:', value) return value }, set(newVal: T) { console.log('set', newVal) value = newVal trigger() }, } }) } let name = MyRef('admin')
ref的更新会带动shallowRef更新