• Returns the raw, original object of a Vue-created proxy.

    toRaw() can return the original object from proxies created by (), (), () or ().

    This is an escape hatch that can be used to temporarily read without incurring proxy access / tracking overhead or write without triggering changes. It is not recommended to hold a persistent reference to the original object. Use with caution.

    Type Parameters

    • T


    • observed: T

      The object for which the "raw" value is requested.

    Returns T


    const foo = {}
    const reactiveFoo = reactive(foo)

    console.log(toRaw(reactiveFoo) === foo) // true



Generated using TypeDoc