Retree - v1.0.0
    Preparing search index...

    Function reconcileArrayById

    • Create a reconciler for arrays of objects with stable IDs.

      Type Parameters

      • TItem extends Record<TKey, PropertyKey>
      • TKey extends string

      Parameters

      • idKey: TKey

        Object key containing the stable item ID.

      Returns IStateReconciler<TItem[]>

      A reconciler that updates matching array items in place.

      Use this for non-Convex arrays whose items have stable IDs. Reconciliation updates matching items in place so child object identity stays stable for useNode(item) rows and Retree parent relationships.

      Do not use index-based reconciliation for lists that can reorder. Prefer a stable ID from the server.

      this.tasks = this.query(api.tasks.listExternal, {
      args: { projectId },
      reconcile: reconcileArrayById("id"),
      });