
TanStack DB
A reactive client store focused on real-time sync and speed. It extends TanStack Query with typed collections, live queries, and optimistic mutations to keep UIs consistent and blazing fast.Collections model normalized, typed sets of data that can be queried reactively across relationships. Live queries deliver sub-millisecond results, even with joins, filters, and aggregates, powered by a TypeScript implementation of differential dataflow. Fine‑grained reactivity minimizes component re-renders by tracking exactly what changed.Optimistic mutations and robust transaction primitives enable instant local writes, batching and staging updates, and syncing to a backend with automatic rollbacks and lifecycle hooks. Designed for large, complex applications, it brings normalized data, fast cross-collection queries, and a smooth developer experience to any frontend stack.
Features
- Reactive client store with typed collections
- Live queries with joins, filters, and aggregates
- Sub-millisecond query engine powered by differential dataflow
- Fine-grained reactivity to minimize re-renders
- Optimistic mutations with robust transaction primitives
- Instant local writes with sync and lifecycle support
- Automatic rollbacks for failed syncs
- Normalized data modeling across collections
- Cross-collection querying at scale
- TypeScript-first APIs and types
- Integrates with TanStack Query
- Framework-agnostic usage
Links
Stats
GitHub Stars2.9K
NPM Downloads6.1K/week
Details
Latest Version0.1.3
Created at3/11/2025
Updated at8/17/2025
LicenseMIT License
Related Items

TinyBase
Reactive, in-memory data store and sync engine for local-first apps with CRDTs, queries, granular listeners, and optional React hooks and components.

valtio
This library simplifies proxy-based state management for modern applications, enhancing the development experience with efficient rendering and easy state manipulation.

Jotai
A powerful yet lightweight state management solution that adopts an atomic approach for managing state in React applications.

Legend State
This powerful library streamlines state management in your applications, making complex data handling a breeze.

MobX-State-Tree
A full-featured library that simplifies state management by providing a structured approach to mutable state handling.

MobX
This state management solution enables seamless integration of dynamic data in your applications, adapting to changes effortlessly.