db
The reactive client store for your API.
TanStack DB is a client-side data store for web applications, designed to sit between your app's UI and the API it talks to. It is currently in beta. The library addresses a specific set of problems that come up when building apps that load a lot of data or need to feel fast: too many separate API calls that slow things down, UI that lags while waiting for server responses, and complex front-end code to keep data consistent across different parts of the app.
The approach TanStack DB takes is to load data into normalized collections on the client, run queries against those collections locally, and apply changes optimistically before they are confirmed by the server. Normalized storage means each piece of data is stored once rather than duplicated across multiple query results. Optimistic writes means the UI updates immediately when a user takes an action, without waiting for a server round-trip to complete. The README describes query performance as sub-millisecond for live queries.
TanStack DB is part of the broader TanStack ecosystem, which includes other widely used libraries like TanStack Query for async state management and TanStack Router for client-side routing. The README lists the full family of related packages. The project is sponsored by companies including Cloudflare, Prisma, and ElectricSQL.
The library is available as an npm package. Documentation is hosted at tanstack.com/db. Community discussion happens on GitHub and a Discord server. The README is brief and directs readers to the documentation site and a blog post for more detailed information about what the library does and how to use it.