React Crash propagation

Error boundaries and diagnostics reporting.

Crash propagation

Runtime failures in React component trees can be captured and correlated with renderer diagnostics. Use React error boundaries to catch exceptions and then call the renderer’s crash reporting facilities to inspect the component stack and logs.

Wrap critical sections in an error boundary and, in the catch handler, invoke renderer.reportCrash with the error and component stack. This records the failure and optionally displays it in the console overlay.

Option / EnvTypeDefaultEffect
logCrashReportsToConsolebooleanfalseWhen enabled, detailed crash reports are printed (via console.error) as soon as a crash is reported.
openConsoleOnErrorbooleanfalseAutomatically opens the console overlay when an error/crash is reported.
CASCADE_LOG_CRASH_REPORTSboolean env0Enables logging crash reports to console (useful in development / CI).
import { createCliRenderer } from "@cascadetui/core"
import { createRoot } from "@cascadetui/react"

const renderer = await createCliRenderer({
  useConsole: true,
  openConsoleOnError: true,
  logCrashReportsToConsole: true,
})

createRoot(renderer).render(<App />)

Tip: in terminal UIs, stdout/stderr can be hidden by alternate screen mode. Keeping useConsole enabled during development makes crash debugging much easier.