Function useReactiveSnapshot

  • This composable integrates reactive values into the vue reactivity system. From within compute, you can reference any reactive values and return some derived value. That value will refresh (for your vue component) whenever any of its reactive dependencies change.

    Because compute may be called very often (if there are many updates), it should be fast.

    Type Parameters

    • T

      The return type of compute.

    Parameters

    • compute: (() => T)

      A function that may access reactive data and returns some derived result.

        • (): T
        • Returns T

    Returns Readonly<ShallowRef<T>>

    A readonly vue reference (the snapshot). snapshot.value is the current value of compute().

Generated using TypeDoc