TanStack DB releases 1.0 RC1 with server rendering and adapters
TanStack DB 1.0 RC1 adds server rendering and adapters to its typed collections and live queries. Apps can start with REST APIs, then add persistence, offline writes or real-time synchronization incrementally.

TL;DR
- TanStack DB 1.0 RC1 adds server rendering, Neon Realtime and Convex collection adapters, and Preact support, according to TanStack's release rundown.
- Apps can start with existing REST APIs and TanStack Query, then add persistence, offline writes or real-time sync under the same application-facing query model.
- Agent-assisted hardening produced 211 oracle test files across 15 packages and 420,000 lines of new tests, TanStack reports.
Server-rendered live queries can ship ordered result snapshots without serializing every source collection. The release post describes a test oracle that initially accepted invalid update events, while the migration guide removes automatic mutation refetching.
Typed collections and live queries
DB's application-facing model has three pieces, laid out in TanStack's explanation:
- Typed collections: Records loaded from an API or sync engine.
- Live queries: Joins and filters across collections, with results updated as data changes.
- Optimistic mutations: Edits appear immediately, synchronize with the backend and roll back on failure.
A Query-backed collection can begin with existing REST endpoints. Persistence, durable offline writes and real-time synchronization are incremental additions, rather than prerequisites for using the query layer.
Server rendering and new adapters
The changes since 0.6 span four areas:
- Server rendering: SSR support and deeper TanStack Start integration.
- Collection adapters: Neon Realtime and Convex.
- Framework adapters: Preact, the sixth supported framework.
- Core implementation: Bug fixes, faster execution and a smaller footprint, without quantified performance claims in the announcement.
Server and browser share descriptors but use separate DbClient instances, according to the SSR documentation. The browser renders its hydrated snapshot immediately, starts normal synchronization and live-query processing, then atomically replaces a query snapshot when its browser result becomes authoritative.
Oracle tests for coding agents
The oracle campaign is the engineering highlight: Kyle Mathews, a core TanStack DB maintainer, describes generated operation histories running through both DB and small, independent reference models. Comparing their outputs gives agents concrete counterexamples to investigate.
One subscriber bug exposed a hole in the reference model:
- After a deleted row became visible again, DB could send an update to a subscriber that needed an insert.
- The simulated subscriber used JavaScript's
Map.setfor both operations. It recreated the missing row, allowing the invalid message to pass the comparison. - The oracle was tightened so inserts required absent keys, while updates and deletes required present keys. Without generating new histories, 26 of 378 existing cases failed; the production fix made all 378 pass.
The repository also gives fresh agents a coverage map pointing to relevant oracles. Each model keeps the reasoning behind its rules beside the executable checks, so a disagreement can expose an implementation bug, a mistaken model or an unresolved design decision.
Production deployments
TanStack names three production deployments:
- Prisma: Prisma Studio, its open-source database editor.
- Unkey: Its developer dashboard.
- Skylight: A React Native family calendar app using DB's offline capabilities.
The team reports more than one million weekly downloads of the core @tanstack/db package. ElectricSQL and Neon back the project, according to TanStack's acknowledgments.
RC1 migration changes
The upgrade from 0.9.2 to 1.0.0-rc.1 changes mutation completion, query identity and error handling, as detailed in the migration guide:
- Row metadata:
$syncedbecomes$hasPendingWrites, with the opposite boolean meaning. No pending local writes does not by itself prove server confirmation. - Transaction completion:
transaction.isPersisted.promisebecomestransaction.when('settled'). Settlement confirms a backend write only when the mutation handler waits for that confirmation before returning. - Query Collection mutations: Automatic refetching is removed. Without an explicit refetch or a confirmed-data write, optimistic changes revert at settlement even when the server accepted the mutation.
- Electric synchronization: Returning
{ txid }no longer coordinates synchronization. The replacement is an awaitedcollection.utils.awaitTxId(txid)inside the handler. - React query identity: Live-query hooks lose dependency arrays. Structured queries derive their identity from the query; opaque functional clauses need an explicit, serializable
queryKeycontaining captured values. - Error state: After readiness, network or backend failures retain rows and
status: 'ready', with problems exposed throughhealth. Local failures use a terminalcrashedstatus.
The package instructions use npm's rc tag for pre-1.0 packages being upgraded together. Two exceptions, @tanstack/query-db-collection and @tanstack/offline-transactions, were accidentally published as 1.0 before the RC; their accompanying releases remain on 1.x and require the RC core as a peer dependency.