Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SSR and hydration support for @tanstack/angular-db

未关闭
#1,965 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃

调研方向

Start with the core DbClient dehydration/hydration payload and observer contract from #1564, then trace injectLiveQuery and Angular DI through an SSR request and browser hydration path. Add a real Angular SSR/hydration integration or E2E test covering independent requests and a post-hydration live update; done means matching initial rows and order without duplicates or hydration errors, plus documented setup and unsupported query forms.

由索引模型根据 Issue 内容生成。

描述

Follow-up to #1623 (Phase 6). #1564 added core DbClient, collection descriptors, and dehydration/hydration, while Angular still needs its own client/SSR integration.

Goal

Make injectLiveQuery work during Angular server rendering with a request-scoped DbClient, and hydrate the result into the browser client before components first read it. Keep Angular DI and signals as the public integration model.

Acceptance criteria

  • Provide an Angular DI provider/token (or equivalent idiomatic API) for DbClient. A server request gets a fresh client; the browser keeps a stable client. Existing direct-collection queries continue to work.
  • injectLiveQuery can resolve collection descriptors through that client and render preloaded collection or live-query results on the server. dbClient.dehydrate() supplies the state to transfer.
  • Transfer and hydrate the state before the first browser query read (using Angular TransferState or an equivalent mechanism). Initial rows and order match server HTML; normal sync then takes over without duplicates or hydration errors.
  • Add an integration or E2E test through a real Angular SSR/hydration path. Cover independent requests and a live update after hydration.
  • Document the DI/server setup and any unsupported query forms.

Reuse the core SSR payload and observer contract; avoid a separate Angular-only state format.

主要语言
TypeScript
星标
3.9k
派生
268
平均合并
1 天 3 小时
30 天内合并 PR
193

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/db 的其他 Issue

查看 TanStack/db 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。