You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query.md
+20-24Lines changed: 20 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ authors:
12
12
13
13
If you’ve ever muttered “**why is this still so hard in 2025?**”—same.
14
14
15
-
TanStack DB is our answer: a client-side database layer powered by differential dataflow. It plugs straight into your existing useQuery calls.
15
+
TanStack DB is our answer: a client-side database layer powered by differential dataflow that plugs straight into your existing useQuery calls.
16
16
17
17
It recomputes only what changed—**0.3 ms to update one row in a 100k collection** on an M1 Pro
18
18
@@ -79,11 +79,11 @@ One early-alpha adopter, building a Linear-like application, swapped out a pile
79
79
80
80
Today most teams face an ugly fork in the road:
81
81
82
-
A. **View-specific endpoints** (fast render, slow network, endless endpoint sprawl) or
82
+
**Option A. View-specific APIs** (fast render, slow network, endless endpoint sprawl) or
83
83
84
-
B. **Load-everything-and-filter** (simple backend, sluggish client).
84
+
**Option B. Load-everything-and-filter** (simple backend, sluggish client).
85
85
86
-
Differential dataflow unlocks **OptionC**—load normalized collections once, let TanStack DB stream millisecond-level incremental joins in the browser. No rewrites, no spinners, no jitter.
86
+
Differential dataflow unlocks **OptionC**—load normalized collections once, let TanStack DB stream millisecond-level incremental joins in the browser. No rewrites, no spinners, no jitter.
87
87
88
88
**Live queries, effortless optimistic writes, and a radically simpler architecture**—all incrementally adoptable.
89
89
@@ -264,15 +264,15 @@ But it doesn’t just improve your current architecture — it enables a new rad
264
264
265
265
## TanStack DB enables a radically simplified architecture
266
266
267
-
If you're using TanStack Query, you've probably hit this architectural fork:
267
+
Let's revisit the three options:
268
268
269
269
**Option A — View-Specific APIs**: Create view-specific API endpoints that return exactly what each component needs. Clean, fast, zero client-side processing. But now you're drowning in brittle API routes, dealing with network waterfalls when components need related data, and creating tight coupling between your frontend views and backend schemas.
270
270
271
-
**Option B — Loadand Filter Client-Side**: Load broader datasets and filter/process them client-side. Fewer API calls, more flexible frontend. But you slam into the performance wall — `todos.filter()`, `users.find()`, `posts.map()`, `useMemo()` everywhere, with cascading re-renders destroying your UX.
271
+
**Option B — Load-everything-and-filter**: Load broader datasets and filter/process them client-side. Fewer API calls, more flexible frontend. But you slam into the performance wall — `todos.filter()`, `users.find()`, `posts.map()`, `useMemo()` everywhere, with cascading re-renders destroying your UX.
272
272
273
273
Most teams pick Option A to avoid performance problems. You're trading client-side complexity for API proliferation and network dependency.
274
274
275
-
**TanStack DB enables Option C – Normalized Collections + Incremental Joins (TanStack DB):** Load normalized collections through fewer API calls, then perform lightning-fast incremental joins in the client. You get the network efficiency of broad data loading with sub-millisecond query performance that makes Option A unnecessary.
275
+
**TanStack DB enables Option C – Normalized Collections + Incremental Joins:** Load normalized collections through fewer API calls, then perform lightning-fast incremental joins in the client. You get the network efficiency of broad data loading with sub-millisecond query performance that makes Option A unnecessary.
0 commit comments