API reference · generated from source
Function: reconcileArray()#
function reconcileArray<TItem>(
current,
next,
getId): void;Defined in: retree-query/src/internals/reconcile.ts:53
Reconcile next into current by item id, writing only the diffs.
Type Parameters#
| Type Parameter |
|---|
TItem extends object |
Parameters#
| Parameter | Type |
|---|---|
current | TItem[] |
next | TItem[] |
getId | (item) => PropertyKey |
Returns#
void
Remarks#
Objects written into current are copies, so next stays free for other
queries and the source's cache.