Skip to content
Source
Sign inSign up
TanStack/pacer
Open History to see the last commit

ReactAsyncBatcherOptions.md

44 lines928 Bytes

1---
2id: ReactAsyncBatcherOptions
3title: ReactAsyncBatcherOptions
4---
5​
6Defined in: [async-batcher/useAsyncBatcher.ts:12](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L12)
7​
8## Extends
9​
10- `AsyncBatcherOptions`\<`TValue`\>
11​
12## Type Parameters
13​
14### TValue
15​
16`TValue`
17​
18### TSelected
19​
20`TSelected` = \{
21\}
22​
23## Properties
24​
25### onUnmount?
26​
27```ts
28optional onUnmount?: (batcher) => void;
29```
30​
31Defined in: [async-batcher/useAsyncBatcher.ts:20](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L20)
32​
33Optional callback invoked when the component unmounts. Receives the batcher instance.
34When provided, replaces the default cleanup (cancel + abort); use it to call flush(), reset(), cancel(), add logging, etc.
35​
36#### Parameters
37​
38##### batcher
39​
40[`ReactAsyncBatcher`](ReactAsyncBatcher.md)\<`TValue`, `TSelected`\>
41​
42#### Returns
43​
44`void`