Loading video...
Video Failed to Load
TanStack DB 1.0 RC1 is out! Backend data that feels local: typed collections, live queries, and edits that show up instantly, then sync. Start with your REST API. Add persistence, offline writes, and real-time sync later. Your queries stay the same.
111,426 views • 3 days ago •via X (Twitter)
29 Comments

DB loads records from your API or sync engine into typed collections. Live queries join and filter across them and update as data changes. Optimistic edits apply at once and sync to your backend, with rollbacks handled for you.

You adopt it a step at a time. Start with your existing REST APIs and TanStack Query. Add local persistence, durable offline writes, or real-time sync when you need them. The query model stays the same, so going local-first doesn't mean a rewrite.

New since 0.6: • Server rendering and deep TanStack Start integration • Neon Realtime and Convex adapters • Preact, our sixth framework adapter • Faster and smaller, with a long list of bug fixes

Teams already ship DB in production: Prisma in Prisma Studio, Unkey across its developer dashboard, and Skylight in its React Native family calendar app, offline features included. The core DB package now gets over a million weekly npm downloads.

How we got to 1.0: 211 oracle test files across 15 packages. Each oracle is a small, independent model of how part of DB should behave. Generated histories run through both, and any mismatch is a bug or a design question. 420K lines of new tests later, the API is stable.

Try the RC in your most demanding app and tell us how it goes. Get started: Upgrading: Release post:

Built by @kylemathews , @samwillis , and @KevinDP55 with the TanStack community, and backed by @ElectricSQL and @neondatabase. Thank you to everyone who filed issues, sent PRs, and shipped DB before 1.0.

Is that Convex support I spy! Finally!

Does it work with React Native?

This is the only thing I’m missing with @convex for offline support 🫣

Huge

🚀

This is A.M.A.Z.I.N.G. guys!

I'd start from the REST API too. How do offline writes settle when two devices edit the same row before either one syncs?

@grok does that mean I can replace sql lite with this ? Instead of spinning up sql light each time I could just dump data on client side and use browser tool call for ai to make sql query on front end and summarize it for user ?

@at_chiru Any work being done with SurrealDB and TanStack DB?

y'all are cooking again 🔥

the live queries are differential dataflow underneath (d2ts, a typescript take on mcsherry's idea) so a join only redoes the rows that changed, not the whole query .. thats the bit that makes it feel local

Backend data that feels local is what every optimistic update has been quietly pretending to be.

letting people keep their existing rest api is the only reason this might actually get adopted instead of being another cool toy

I still don't understand what problem it solves

It's very cool :O

Wild, 420K lines of new tests for 1.0! I will try it on Hearof and see how far just the REST API gets me

型付きコレクションとライブクエリで、サーバー状態をローカルの操作感に寄せる狙いが分かりやすいですね。即時編集と同期の境界がどう扱われるか、REST APIとの組み合わせも気になります。

why not tanstack query with a persister?

🔥

Can't you achieve this with 1 zod schema shared between mongo and tRPC, using tRPC's tanstack integration?

I see a convex adapter wouldn’t this replace convex?

instant optimistic edits plus offline writes is the hard combo and starting from a plain rest api means most teams can adopt it without rewriting their backend


