TanStack
Batcher API Reference

AsyncBatcherController

Defined in: async-batcher/AsyncBatcherController.ts:11

Owns a AsyncBatcher for a Lit host. Access core methods and selected state through pacer.

Type Parameters

TValue

TValue

TSelected

TSelected = { }

Constructors

Constructor

ts
new AsyncBatcherController<TValue, TSelected>(
   host,
   fn,
   options?,
selector?): AsyncBatcherController<TValue, TSelected>;

Defined in: async-batcher/AsyncBatcherController.ts:13

Parameters

host

ReactiveControllerHost

fn

(items) => Promise<any>

options?

LitPacerOptions<LitAsyncBatcherOptions<TValue, TSelected>> = {}

selector?

(state) => TSelected

Returns

AsyncBatcherController<TValue, TSelected>

Properties

pacer

ts
readonly pacer: LitAsyncBatcher<TValue, TSelected>;

Defined in: async-batcher/AsyncBatcherController.ts:12

Accessors

state

Get Signature

ts
get state(): Readonly<TSelected>;

Defined in: async-batcher/AsyncBatcherController.ts:23

Selected reactive state. Reading this property participates in host rendering.

Returns

Readonly<TSelected>