reconcile
Edit this pagereconcile
is designed for diffing data changes in situations where granular updates cannot be applied.
This is useful when dealing with immutable data from stores or handling large API responses.
reconcile
has a key
option that can be used when available to match items.
The value
accepts either a value of type T
or a Store containing values of type T
.
This represents the data to be reconciled.
The reconcile
function helps manage data changes by performing a diffing process, making it particularly handy in scenarios where applying granular updates is challenging or inefficient.
The key
and merge
options provide flexibility to customize the reconciliation process based on specific needs.
Options
Option | Type | Default | Description |
---|---|---|---|
key | string | "id" | Specifies the key to be used for matching items during reconciliation |
merge | boolean | false | When merge is false, referential checks are performed where possible to determine equality, and items that are not referentially equal are replaced. When merge is true, all diffing is pushed to the leaves, effectively morphing the previous data to the new value. |