Open History to see the last commit
1---
2id: withArrayChangeTracking
3title: withArrayChangeTracking
4---
5
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7
8# Function: withArrayChangeTracking()
9
10```ts
11function withArrayChangeTracking<T>(targets, callback): Record<string | symbol, unknown>[]
12```
13
14Defined in: [packages/db/src/proxy.ts:1005](https://github.com/TanStack/db/blob/main/packages/db/src/proxy.ts#L1005)
15
16Creates proxies for an array of objects, passes them to a callback function,
17and returns the changes made by the callback for each object
18
19## Type Parameters
20
21• **T** *extends* `object`
22
23## Parameters
24
25### targets
26
27`T`[]
28
29Array of objects to proxy
30
31### callback
32
33(`proxies`) => `void`
34
35Function that receives the proxies and can make changes to them
36
37## Returns
38
39`Record`\<`string` \| `symbol`, `unknown`\>[]
40
41Array of changes made to each object