Ditto JS SDK v5.0.0
    Preparing search index...

    Class Differ

    Calculates diffs between arrays of QueryResultItem.

    Use a Differ with a StoreObserver to get the diff between subsequent query results delivered by the store observer.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Calculate the diff of the provided items against the last set of items that were passed to this differ.

      The returned Diff identifies changes from the old array of items to the new array of items using indices into both arrays.

      Initially, the differ has no items, so the first call to this method will always return a diff showing all items as insertions.

      The identity of items is determined by their _id field.

      Parameters

      Returns Diff