CodeSampleX

Exemplo

Hydrate SSR HTML with hydrateRoot, handle hydration mismatch recovery, and configure React 19 onCaughtError, onUncaughtError, and onRecoverableError callbacks

sha256:5436cd1a4056e1c48d4f46d5a70e484e7f9126365b1903606810b7178e550399

Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu. Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas. MIT-0

Evidência de execução

O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.

Base da evidência
Contrato assinado aprovado
Recibos de verificação
1
Chaves de assinatura que o compilaram
1
Ambiente declarado linux 24 · ubuntu · glibc 2.39 x64 npm

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-26

Caso

HOW
Objetivo
Hydrate SSR HTML with hydrateRoot, handle hydration mismatch recovery, and configure React 19 onCaughtError, onUncaughtError, and onRecoverableError callbacks
Pacotes
Símbolos
  • hydrateRoot
  • react-dom/client.hydrateRoot
Criado
2026-08-26T08:08:50Z

Contrato

  1. hydrateRoot is exported from react-dom/client and is absent from the react-dom root entrypoint
  2. clean SSR hydration attaches to server-rendered DOM without recoverable errors
  3. hydration mismatch invokes onRecoverableError with mismatch details and recovers by regenerating client DOM
  4. component errors caught by Error Boundary trigger root onCaughtError with error details and componentStack
  5. unhandled component errors during hydration trigger root onUncaughtError with componentStack
  6. root.unmount synchronously clears host DOM and invalidates the root against subsequent renders

Arquivos

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

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

anônimo