TanStack
Store v0v0
NewTanStack Intent
Log In
StartRC
StartRC
Router
Router
Query
Query
Table
Table
DBbeta
DBbeta
AIalpha
AIalpha
Formnew
Formnew
Virtual
Virtual
Pacerbeta
Pacerbeta
Hotkeysalpha
Hotkeysalpha
Storealpha
Storealpha
Devtoolsalpha
Devtoolsalpha
CLIalpha
CLIalpha
Intentalpha
Intentalpha
More Libraries
More Libraries
BuilderAlpha
BuilderAlpha
Blog
Blog
Maintainers
Maintainers
Partners
Partners
Showcase
Showcase
LearnNEW
LearnNEW
Stats
Stats
YouTube
YouTube
Discord
Discord
Merch
Merch
Support
Support
GitHub
GitHub
Ethos
Ethos
Tenets
Tenets
Brand Guide
Brand Guide
Docs
CodeRabbitCodeRabbit
CloudflareCloudflare
AG GridAG Grid
SerpAPISerpAPI
NetlifyNetlify
OpenRouterOpenRouter
NeonNeon
WorkOSWorkOS
ClerkClerk
ConvexConvex
ElectricElectric
PowerSyncPowerSync
SentrySentry
RailwayRailway
PrismaPrisma
StrapiStrapi
UnkeyUnkey
CodeRabbitCodeRabbit
CloudflareCloudflare
AG GridAG Grid
SerpAPISerpAPI
NetlifyNetlify
OpenRouterOpenRouter
NeonNeon
WorkOSWorkOS
ClerkClerk
ConvexConvex
ElectricElectric
PowerSyncPowerSync
SentrySentry
RailwayRailway
PrismaPrisma
StrapiStrapi
UnkeyUnkey
Menu
  • Home
  • Frameworks
  • Contributors
  • NPM Stats
  • GitHub
  • YouTube
  • Discord
Getting Started
  • Overview
  • Installation
  • Quick Start
  • Quick Start
API Reference
  • JavaScript Reference
  • Classes / Store
  • Interfaces / Atom
  • Interfaces / AtomOptions
  • Interfaces / BaseAtom
  • Interfaces / InternalBaseAtom
  • Interfaces / InternalReadonlyAtom
  • Interfaces / InteropSubscribable
  • Interfaces / Readable
  • Interfaces / ReadonlyAtom
  • Interfaces / Subscribable
  • Interfaces / Subscription
  • Type Aliases / AnyAtom
  • Type Aliases / Observer
  • Type Aliases / Selection
  • Functions / batch
  • Functions / createAsyncAtom
  • Functions / createAtom
  • Functions / createStore
  • Functions / flush
  • Functions / toObserver
  • React Reference
  • Functions / useStore
  • Functions / shallow
Examples
  • Simple
Menu
  • Home
  • Frameworks
  • Contributors
  • NPM Stats
  • GitHub
  • YouTube
  • Discord
Getting Started
  • Overview
  • Installation
  • Quick Start
  • Quick Start
API Reference
  • JavaScript Reference
  • Classes / Store
  • Interfaces / Atom
  • Interfaces / AtomOptions
  • Interfaces / BaseAtom
  • Interfaces / InternalBaseAtom
  • Interfaces / InternalReadonlyAtom
  • Interfaces / InteropSubscribable
  • Interfaces / Readable
  • Interfaces / ReadonlyAtom
  • Interfaces / Subscribable
  • Interfaces / Subscription
  • Type Aliases / AnyAtom
  • Type Aliases / Observer
  • Type Aliases / Selection
  • Functions / batch
  • Functions / createAsyncAtom
  • Functions / createAtom
  • Functions / createStore
  • Functions / flush
  • Functions / toObserver
  • React Reference
  • Functions / useStore
  • Functions / shallow
Examples
  • Simple
AI/LLM: This documentation page is available in plain markdown format at/store/latest/docs/reference/functions/batch.md
API Reference

batch

Function: batch()

ts
function batch(fn): void;

Defined in: batch.ts:4

Parameters

fn

() => void

Returns

void

Edit on GitHub
PreviousType Aliases / Selection
NextFunctions / createAsyncAtom

On this page

  • Function: batch()
  • Parameters
  • fn
  • Returns
Blog
@Tan_Stack on X.com
@TannerLinsley on X.com
GitHub
YouTube
Nozzle.io - Keyword Rank Tracker
Ethos
Tenets
Privacy Policy
Terms of Service
© 2026 TanStack LLC
Partners
CodeRabbitCodeRabbit
CloudflareCloudflare
AG GridAG Grid
SerpAPISerpAPI
NetlifyNetlify
OpenRouterOpenRouter
NeonNeon
WorkOSWorkOS
ClerkClerk
ConvexConvex
ElectricElectric
PowerSyncPowerSync
SentrySentry
RailwayRailway
PrismaPrisma
StrapiStrapi
UnkeyUnkey
Become a Partner
Latest Posts
Lazy Tool Discovery: Scaling AI Tool Systems Without Drowning in TokensMar 12, 2026TanStack AI Just Got Middleware — And It Changes EverythingMar 12, 2026Talk to Your AI: Realtime Voice Chat in TanStack AIMar 12, 2026
TanStack Start

Full-stack Framework powered by TanStack Router for React and Solid

Explore Start →
TanStack Router

Type-safe Routing for React and Solid applications

Explore Router →
TanStack OSS