@dxos/echo
    Preparing search index...

    Function getReactive

    • Returns the reactive version of an object from the database, given its snapshot. Inverse of Obj.getSnapshot.

      Uses Obj.getDatabase internally to get the database from the snapshot, then resolves the reactive object by ID.

      Type Parameters

      Parameters

      • snapshot: Obj.Snapshot<T>

        A snapshot of the object (from Obj.getSnapshot).

      Returns Effect<T, GetReactiveError>

      Effect that succeeds with the reactive object, or fails with GetReactiveError.

      const snapshot = Obj.getSnapshot(obj);
      const reactive = Obj.getReactive(snapshot).pipe(
      Effect.runSync
      );

      O(1) working-set lookup by id; never loads from disk.