• Force trigger effects that depends on a shallow ref. This is typically used after making deep mutations to the inner value of a shallow ref.

    Parameters

    • ref: Ref<any, any>

      The ref whose tied effects shall be executed.

    Returns void

    const shallow = shallowRef({
    greet: 'Hello, world'
    })

    // Logs "Hello, world" once for the first run-through
    watchEffect(() => {
    console.log(shallow.value.greet)
    })

    // This won't trigger the effect because the ref is shallow
    shallow.value.greet = 'Hello, universe'

    // Logs "Hello, universe"
    triggerRef(shallow)

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