TanStack DB is a reactive client store built on differential dataflow that extends TanStack Query with collections, live queries, and optimistic mutations. It normalizes data into typed collections, enables sub-millisecond cross-collection queries, and provides instant optimistic updates with automatic rollback on failure.
When to use: Reactive UIs needing local-first data, cross-collection joins with live updates, optimistic mutations with automatic sync, real-time sync via ElectricSQL or other backends, apps that outgrow TanStack Query's per-query caching model.
When NOT to use: Simple fetch-and-display (TanStack Query alone suffices), server-components-only apps, purely synchronous local state (useState/Zustand), GraphQL with normalized caching (Apollo/urql).
Reaktive, clientseitige TanStack DB-Datenbank mit Live-Abfragen und optimistischen Mutationen. Verwenden Sie diese Option, wenn Sie reaktive Benutzeroberflächen mit Local-First-Daten, Synchronisierungs-Engines oder optimistischen Updates erstellen. Verwendung für Tanstack-DB, Live-Abfragen, optimistische Mutationen, Synchronisierungs-Engine, reaktive Datenbank, Local-First. Quelle: oakoss/agent-skills.