mobx-keystone

    Function getSnapshot

    • Retrieves an immutable snapshot for a data structure. Since returned snapshots are immutable they will respect shallow equality, this is, if no changes are made then the snapshot will be kept the same.

      Type Parameters

      Parameters

      • type: T
      • nodeOrPrimitive: TypeToData<T>

        Data structure, including primtives.

      Returns SnapshotOutOf<TypeToData<T>>

      The snapshot.

    • Retrieves an immutable snapshot for a data structure. Since returned snapshots are immutable they will respect shallow equality, this is, if no changes are made then the snapshot will be kept the same.

      Type Parameters

      • T

        Object type.

      Parameters

      • nodeOrPrimitive: T

        Data structure, including primtives.

      Returns SnapshotOutOf<T>

      The snapshot.

    MMNEPVFCICPMFPCPTTAAATR