Vue.js · Function
toRefs
toRefs converts a reactive object into an object of linked refs. This lets you destructure returned state without losing reactivity.
Last updated
Syntax
function toRefs<T extends object>(object: T): { [K in keyof T]: ToRef<T[K]> }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toRef()reactive()ref()setup()