Function diffList

  • Compares 2 lists, returns an array of DiffEntry with the operations needed to make in the oldData to create the new list. It only returns the actions that are needed, if an element does not need to move, then it's not returned

    Type Parameters

    • T

    Parameters

    • newData: T[]

      The new data to compare against the old data.

    • oldData: T[]

      The old data to compare against the new data.

    • key: ((item) => any) = ...

      A function that returns a unique key for each item in the list. This is used to optimize the rendering process.

        • (item): any
        • Parameters

          • item: T

          Returns any

    Returns DiffEntry<T>[]

Generated using TypeDoc