Skip to content

TanStack DB

Reactive client store for building super-fast apps. With sub-millisecond reactivity and instant local writes.

What is TanStack DB?

TanStack DB is a reactive client-side database designed for local-first web applications. It provides a unified data layer that integrates with multiple sync backends, including Postgres Sync and Durable Streams.

Key features:

  • Reactive queries — UI components automatically update when underlying data changes
  • Optimistic updates — instant responsiveness with automatic conflict resolution
  • Multi-source sync — combine data from Postgres Sync and Durable Streams in one client database
  • Framework integrations — first-class support for React, Vue, and other frameworks

Use cases

TanStack DB is ideal for:

  • Local-first applications that need offline support and instant updates
  • Collaborative apps where multiple users edit shared data
  • Applications combining structured data (via Postgres Sync) with real-time streams (via Durable Streams)
  • Any app that needs a reactive, queryable client-side data store

How it works

TanStack DB acts as the client-side data layer in the Electric ecosystem. It receives data from multiple sources and provides a unified, reactive interface for your application.

Postgres Sync ────────────┐
(structured data)         │
                          ├───→ TanStack DB ───→ React/Vue/etc.
Durable Streams ──────────┘     (client DB)      (reactive UI)
(streams, AI, sessions)

Data flows from your backend through Electric's sync primitives into TanStack DB, which then powers your reactive UI components.

Learn more

For an interactive guide to TanStack DB, how it works and why it might change the way you build apps, see What TanStack DB is.

Showcase

See applications built with TanStack DB in the TanStack Showcase.

More information

See how you can combine TanStack DB with other Electric products to build fast, modern UIs.