DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/functions/withArrayChangeTracking.md
withArrayChangeTracking
ts
function withArrayChangeTracking<T>(targets, callback): Record<string | symbol, unknown>[];Defined in: packages/db/src/proxy.ts:881
Creates proxies for an array of objects, passes them to a callback function, and returns the changes made by the callback for each object
Type Parameters#
T#
T extends object
Parameters#
targets#
T[]
Array of objects to proxy
callback#
(proxies) => void
Function that receives the proxies and can make changes to them
Returns#
Record<string | symbol, unknown>[]
Array of changes made to each object