# TanStack DB

Reactive client store with live queries and optimistic mutations for sub-millisecond, consistent UIs and real-time sync.

[Website](https://tanstack.com/db/latest) [GitHub](https://github.com/TanStack/db) [npm](https://npmjs.com/package/@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

## Details

**GitHub Stars**

2.9K

**NPM Downloads**

6.1K/week

**Latest Version**

0.1.3

**Created at**

Mar 11, 2025

**Updated at**

Aug 17, 2025

**License**

MIT License

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20KickstartUI)

[Ad 680+ tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=kickstartui)

## Related Items

### [valtio](https://kickstartui.com/details/valtio/)

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

**GitHub Stars**

9.2K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [TinyBase](https://kickstartui.com/details/tinybase/)

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

**GitHub Stars**

4.7K

**Updated at**

Aug 16, 2025

**License**

MIT License

### [Jotai](https://kickstartui.com/details/jotai/)

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

**GitHub Stars**

18.9K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [Legend State](https://kickstartui.com/details/legend-state/)

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

**GitHub Stars**

3.1K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [MobX-State-Tree](https://kickstartui.com/details/mobx-state-tree/)

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

**GitHub Stars**

7.0K

**Updated at**

Dec 3, 2024

**License**

MIT License

### [MobX](https://kickstartui.com/details/mobx/)

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

**GitHub Stars**

27.6K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [zustand](https://kickstartui.com/details/zustand/)

A modern solution for managing application state in React apps with a focus on simplicity and performance.

**GitHub Stars**

48.5K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [Redux Toolkit](https://kickstartui.com/details/redux/)

A comprehensive toolkit designed to streamline and enhance the Redux development process, ensuring that applications are predictable and maintainable.

**GitHub Stars**

10.8K

**Updated at**

Dec 6, 2024

**License**

MIT License
