FirebaseExtended / FirebaseExtended/reactfire

Spike: Next.js / React Server Components usage guide

未关闭
#722 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
v5
主要语言
TypeScript
星标
3.6k
派生
403
平均合并
14 小时 53 分钟
30 天内合并 PR
5

描述

reactfire works with Next.js but the full SSR/RSC story needs exploration before we can write authoritative guidance. Known pieces:

**Solved (client-side patterns):**
- Context providers need `'use client'` for App Router
- Browser-only SDKs (Analytics, etc.) also need `ssr: false` via `next/dynamic` to prevent SSR initialization — see #530

**Needs exploration:**
- How to use Firestore with React Server Components, including serialization constraints (Firestore objects can't cross the RSC boundary as-is)
- Reference: https://firebase.blog/posts/2026/06/firestore-serialization-react
- General guidance for which reactfire hooks are RSC-compatible vs. client-only

Outcome: a "Using reactfire with Next.js / RSC" section in docs covering both the simple `'use client'` pattern and the Firestore SSR serialization approach.

Related: #530, #334

贡献指南

打开贡献指南

调研方向

检查相关 issue #530 和 #334,然后阅读链接的 Firestore 序列化参考资料。探索在 React Server Components 中使用 Firestore,并确定哪些 reactfire hooks 与 RSC 兼容,哪些仅限客户端使用。完成标准是添加一个“Using reactfire with Next.js / RSC”文档部分,涵盖 'use client' 模式和 Firestore SSR 序列化方法。

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

评估

技术栈
firebase, next.js, react, typescript
领域
documentation, frontend
Issue 类型
文档
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

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