Skip to main content
You are viewing Pre-Alpha documentation.
Vuetify0 Logo
Theme
Mode
Accessibility
Vuetify
Vuetify One

Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

toReactive

The toReactive utility function converts a MaybeRef object to a reactive proxy, automatically unwrapping ref values. It provides special handling for Map, Set, and regular objects.


Intermediate100% coverageMar 3, 2026

Usage

ts
import { ref } from 'vue'
import { toReactive } from '@vuetify/v0'

const state = ref({ name: 'John', age: 30 })
const rstate = toReactive(state)

console.log(rstate.name) // 'John' (no .value needed)

Architecture

toReactive creates a Proxy that unwraps ref values:

Reactive Proxy Flow

Use controls to zoom and pan. Click outside or press Escape to close.

Reactive Proxy Flow

Reactivity

toReactive converts a MaybeRef into a fully reactive proxy with automatic ref unwrapping. This is the primary way to eliminate .value syntax.

BehaviorReactiveNotes
Object accessProperties are reactive, refs auto-unwrapped
Map operationsget/set/entries unwrap ref values
Set operationsIteration unwraps ref values
Array accessIndex access unwraps nested refs
Tip

When to use Use toReactive when you want to:

  • Eliminate .value in templates

  • Pass reactive state to non-Vue code expecting plain objects

  • Create reactive proxies over ref-wrapped collections

API Reference

The following API details are for the toReactive composable.

Functions

toReactive

(objectRef: MaybeRef<Z>) => UnwrapNestedRefs<Z>

Converts a `MaybeRef` to a `UnwrapNestedRefs`.

Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/