TanStack
Batcher API Reference

BatcherController

Defined in: batcher/BatcherController.ts:8

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

Type Parameters

TValue

TValue

TSelected

TSelected = { }

Constructors

Constructor

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

Defined in: batcher/BatcherController.ts:10

Parameters

host

ReactiveControllerHost

fn

(items) => void

options?

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

selector?

(state) => TSelected

Returns

BatcherController<TValue, TSelected>

Properties

pacer

ts
readonly pacer: LitBatcher<TValue, TSelected>;

Defined in: batcher/BatcherController.ts:9

Accessors

state

Get Signature

ts
get state(): Readonly<TSelected>;

Defined in: batcher/BatcherController.ts:20

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

Returns

Readonly<TSelected>