Open History to see the last commit
1---
2id: LitBatcher
3title: LitBatcher
4---
5
6Defined in: [batcher/createBatcher.ts:19](https://github.com/TanStack/pacer/blob/main/packages/lit-pacer/src/batcher/createBatcher.ts#L19)
7
8A Batcher with framework-reactive selected state. All core methods remain available.
9
10## Extends
11
12- `Omit`\<`Batcher`\<`TValue`\>, `"options"` \| `"setOptions"`\>
13
14## Type Parameters
15
16### TValue
17
18`TValue`
19
20### TSelected
21
22`TSelected` = \{
23\}
24
25## Properties
26
27### options
28
29```ts
30options: Omit<Required<BatcherOptions<TValue>>, "initialState" | "key" | "onItemsChange" | "onExecute"> & Partial<Pick<Required<BatcherOptions<TValue>>, "initialState" | "key" | "onItemsChange" | "onExecute">> & LitBatcherOptions<TValue, TSelected>;
31```
32
33Defined in: [batcher/createBatcher.ts:23](https://github.com/TanStack/pacer/blob/main/packages/lit-pacer/src/batcher/createBatcher.ts#L23)
34
35***
36
37### setOptions
38
39```ts
40setOptions: (options) => void;
41```
42
43Defined in: [batcher/createBatcher.ts:24](https://github.com/TanStack/pacer/blob/main/packages/lit-pacer/src/batcher/createBatcher.ts#L24)
44
45#### Parameters
46
47##### options
48
49`Partial`\<[`LitBatcherOptions`](LitBatcherOptions.md)\<`TValue`, `TSelected`\>\>
50
51#### Returns
52
53`void`
54
55***
56
57### state
58
59```ts
60readonly state: Readonly<TSelected>;
61```
62
63Defined in: [batcher/createBatcher.ts:28](https://github.com/TanStack/pacer/blob/main/packages/lit-pacer/src/batcher/createBatcher.ts#L28)
64
65Selected state. Pass a selector to opt in; the default selection is an empty object.
66
67***
68
69### subscribe
70
71```ts
72subscribe: LitPacerSubscribe<BatcherState<TValue>>;
73```
74
75Defined in: [batcher/createBatcher.ts:26](https://github.com/TanStack/pacer/blob/main/packages/lit-pacer/src/batcher/createBatcher.ts#L26)
76
77Subscribes a child owner to selected state with automatic cleanup.