WarUI documentation

Deterministic update batching

experimental

Compare automatic microtask batching, explicit batches, and synchronous commits.

Live example

Expected behavior

One batch yields one render and one commit announcement. Replaying its commands reproduces the state hash.

Source

api.batch(() => {
  api.setPipeline({ filterText: { columnId: 'name', text: 'product' } });
  api.setSort([{ columnId: 'price', direction: 'desc' }]);
});
api.flush();

API reference

GRID-A01-F12 API
KindNameTypeDescription
Methodbatch—Combines synchronous nested changes and rolls back on failure.
Methodflush—Commits queued changes outside an active explicit batch.
Eventbatch:committed—Reports the version, mode and number of changed operations after other events.