avoid toRefs when spread, whether it is feasible
What problem does this feature solve?
export default {
setup() {
const data = reactive({
count: 0,
});
return { ...toRefs(data) }
}
};
data is a proxy can we intercept spread operation, auto use toRef for all property, avoid manually toRefs? i don't know whether it is feasible thanks
What does the proposed API look like?
export default {
setup() {
const data = reactive({
count: 0,
});
return { ...data }
}
};
No that's not possible. WE would have to parse the JS AST for this, which is not something that would fit into the browser build.
No that's not possible. WE would have to parse the JS AST for this, which is not something that would fit into the browser build.
sorry, just use proxy can't Identify which one is spread operation?