CodeSampleX

Beispiel

react 19.2.8: Mount a React 19 client root with a synchronously committed context-aware portal and handle its event and unmount boundaries

Verifiziertes Beispiel für npm react 19.2.8: Mount a React 19 client root with a synchronously committed context-aware portal and handle its event and…

sha256:ac9c6f7661fafad6db031b6eb109f10a581f711946c7eb8faf50c8c8101af4f7

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung node 24.13 windows amd64 node 24.13 javascript npm 11

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-17
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

Fall

HOW
Ziel
Mount a React 19 client root with a synchronously committed context-aware portal and handle its event and unmount boundaries
Pakete
Symbole
  • react-dom/client.createRoot
  • react-dom.flushSync
  • react-dom.createPortal
  • react.createContext
  • react.useContext
Umgebung
node 24.13.1
Erstellt
2026-08-17T02:01:43Z

Contract

  1. createRoot is exported from react-dom/client and is absent from the react-dom root entrypoint
  2. flushSync around root.render commits the root DOM before flushSync returns
  3. createPortal places its child in a separate target while preserving context from its React ancestors
  4. a click from a portal child bubbles to its React ancestor despite separate DOM ancestry
  5. root.unmount synchronously removes both root and portal DOM
  6. root.render after root.unmount throws Cannot update an unmounted root

Dateien

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • src/index.mjs
  • test/contract.mjs

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed