• Preparing search index...
  • The search index is not available
Yank Note Api - v3.82.1
  • Yank Note Api
  • renderer/context/lib
  • vue
  • shallowRef

Function shallowRef

  • shallowRef<T>(value): Ref extends T
        ? T extends Ref
            ? IfAny<T, ShallowRef<T>, T>
            : ShallowRef<T>
        : ShallowRef<T>
  • Shallow version of ().

    Type Parameters

    • T

    Parameters

    • value: T

      The "inner value" for the shallow ref.

    Returns Ref extends T
        ? T extends Ref
            ? IfAny<T, ShallowRef<T>, T>
            : ShallowRef<T>
        : ShallowRef<T>

    Example

    const state = shallowRef({ count: 1 })

    // does NOT trigger change
    state.value.count = 2

    // does trigger change
    state.value = { count: 2 }

    See

    https://vuejs.org/api/reactivity-advanced.html#shallowref

    • Defined in node_modules/@vue/reactivity/dist/reactivity.d.ts:466
  • shallowRef<T>(): ShallowRef<T | undefined>
  • Type Parameters

    • T = any

    Returns ShallowRef<T | undefined>

    • Defined in node_modules/@vue/reactivity/dist/reactivity.d.ts:467

Settings

Member Visibility
Yank Note Api - v3.82.1
  • Loading...

Generated using TypeDoc