Skip to content
masterclass Buddy

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.

Subscribe
  • toRef()
  • reactive()
  • ref()
  • setup()

Source: Reactivity API: Utilities | Vue.js. Checked 2026-11-03.