Skip to content
masterclass Buddy

Vue.js · Function

shallowRef

shallowRef creates a ref that tracks only its .value property. Its inner value is not made deeply reactive, so nested mutations do not trigger effects.

Last updated

Syntax

function shallowRef<T>(value: T): ShallowRef<T>
interface ShallowRef<T> { value: T }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • ref()
  • triggerRef()
  • customRef()
  • reactive()

Source: Reactivity API: Advanced. Checked 2026-11-03.