示例
Mount a React 19 client root with a synchronously committed context-aware portal and handle its event and unmount boundaries
sha256:ac9c6f7661fafad6db031b6eb109f10a581f711946c7eb8faf50c8c8101af4f7
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Mount a React 19 client root with a synchronously committed context-aware portal and handle its event and unmount boundaries HOW
- 包
- react 19.2.8 react-dom 19.2.8 jsdom 29.1.1
- 环境
- node 24.13.1
- 创建时间
- 2026-08-17T02:01:43Z
契约
- createRoot is exported from react-dom/client and is absent from the react-dom root entrypoint
- flushSync around root.render commits the root DOM before flushSync returns
- createPortal places its child in a separate target while preserving context from its React ancestors
- a click from a portal child bubbles to its React ancestor despite separate DOM ancestry
- root.unmount synchronously removes both root and portal DOM
- root.render after root.unmount throws Cannot update an unmounted root
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- 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