サンプル
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