• 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

    Parameters

    • observed: T

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

    Returns T

    Example

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

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

    See

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

Generated using TypeDoc