Subscribe on changes!

expect the ref sugar can support to object destructuring

avatar
Jan 14th 2021

What problem does this feature solve?

can use the ref sugar to destruct Object

What does the proposed API look like?

const a = reactive([1])
ref: [b] = a; // expect it can be worked
console.log(b) // 1

const c = reactive({d : 1})
ref: { d } = a; // expect it can be worked
console.log(b) // 1