UNPKG

@tanstack/store

Version:

Framework agnostic type-safe store w/ reactive framework adapters

13 lines (11 loc) 200 B
import { endBatch, startBatch } from './alien' import { flush } from './atom' export function batch(fn: () => void) { try { startBatch() fn() } finally { endBatch() flush() } }