markstream-react
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMarkstream React
Markstream React
Use this skill when the host app is React or Next and the task is to wire Markstream safely.
当宿主应用为React或Next,且需要安全集成Markstream时,可使用本技能。
Workflow
工作流程
- Confirm the repo is React, Next, or another React-based host.
- Install plus only the requested optional peers.
markstream-react - Import from the app shell or client entry.
markstream-react/index.css - Start with .
content- Move to plus
nodesonly when the UI receives streaming or high-frequency updates.final
- Move to
- Respect SSR boundaries in Next.
- Prefer , dynamic imports with
use client, or other client-only boundaries when browser-only peers are involved.ssr: false
- Prefer
- Use scoped Markstream overrides before custom parser work.
- Validate with the smallest useful dev, build, or typecheck command.
- 确认代码仓库为React、Next或其他基于React的宿主应用。
- 安装及仅所需的可选依赖包。
markstream-react - 从应用外壳或客户端入口导入。
markstream-react/index.css - 从开始使用。
content- 仅当UI需要接收流式更新或高频更新时,切换为搭配
nodes使用。final
- 仅当UI需要接收流式更新或高频更新时,切换为
- 遵守Next中的SSR边界规则。
- 当涉及仅浏览器端依赖时,优先使用、设置
use client的动态导入或其他仅客户端边界。ssr: false
- 当涉及仅浏览器端依赖时,优先使用
- 在进行自定义解析器工作前,使用作用域内的Markstream覆盖配置。
- 使用最精简的dev、build或typecheck命令进行验证。
Default Decisions
默认决策
- Renderer wiring first, migration cleanup second.
- If the repo already uses , pair this skill with
react-markdown.markstream-migration - Prefer the smallest client-only boundary that solves the SSR issue.
- 优先完成渲染器集成,再进行迁移清理工作。
- 若代码仓库已使用,请将本技能与
react-markdown配合使用。markstream-migration - 优先选择能解决SSR问题的最小仅客户端边界。
Useful Doc Targets
实用文档目标
docs/guide/react-quick-start.mddocs/guide/react-installation.mddocs/guide/react-markdown-migration.mddocs/guide/component-overrides.md
docs/guide/react-quick-start.mddocs/guide/react-installation.mddocs/guide/react-markdown-migration.mddocs/guide/component-overrides.md