Add SSR DbClient and live query identity#1564
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: +3.64 kB (+2.99%) Total Size: 125 kB 📦 View Changed
ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 4.24 kB ℹ️ View Unchanged
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
You may be interested in our post-implementation report in grrowl/tanstack-do-db-collection#2 (comment) — it's slop but describes some of our sync layer (single websocket and sequence over multiple collections on a single Durable Object) and approach to implementing SSR support. No major worries in the design; There's edge cases (3, 4) where a row changes between SSR query and later client connection catch-up, but might be satisfied by future canonical collection implementation pattern or docs. Broadly the feedback is it's nice, it works, and works in testing and under contrived edge cases. |
Summary
DbClient,DbProvider, and row-baseddehydrate/hydrateAPIs to support SSR and streaming at the collection level.queryKeyreserved for opaque functional variants and hot render paths.Testing
DbClient, hydration/dehydration, IR hashing,DbProvider, and React live-query identity behavior.@tanstack/dband@tanstack/react-db, plus adapter contracts and docs validation.git diff --check.