示例
Show which values from a React tree survive and which are dropped or reshaped by server stringification boundaries.
sha256:53d4afb16af1cea0fef82d0f97561097002440717618ddb62d5d5134f7928c04
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Show which values from a React tree survive and which are dropped or reshaped by server stringification boundaries. HOW
- 包
- react 19.2.8 react-dom 19.2.8
- 环境
- node
- 创建时间
- 2026-08-17T03:18:20Z
常见的想当然
Any React element rendered with react-dom/server should preserve all props and child boundaries in a stable textual shape.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- assert react-dom/server.renderToString inserts hydration separator comments for mixed renderable children where renderToStaticMarkup removes those separators.
- assert event-handler props, ref, key metadata, and false boolean host props are stripped from renderToString output.
- assert explicit HTML-host props and textual child data still round-trip as rendered attributes and text content.
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9