diff --git a/content/docs/utilities/runner.mdx b/content/docs/utilities/runner.mdx index e2c8ff8a24..f4393512ab 100644 --- a/content/docs/utilities/runner.mdx +++ b/content/docs/utilities/runner.mdx @@ -523,16 +523,28 @@ src/app-data/ ### 2. Error Boundaries -Wrap components in error boundaries: +`SchemaRenderer` already wraps **each rendered component** in a `SchemaErrorBoundary` of +its own, so a single widget that throws degrades to an inline "failed to render" notice +with a Retry button instead of blanking the page — see +[Architecture Overview](/docs/guide/architecture-overview). + +That inner boundary only exists once the component has been resolved. Everything +`SchemaRenderer` does before that point — evaluating `visibleOn`, `disabled` and the +other dynamic expressions, then looking the component type up in the registry — runs +outside it, so a throw there propagates past the inner boundary. Wrap `SchemaRenderer` +itself to catch that class of failure: ```typescript -import { ErrorBoundary } from '@object-ui/components' +import { SchemaErrorBoundary } from '@object-ui/react' - + - + ``` +Two optional props tune it: `componentType` names the component in the fallback text, and +`resetKey` clears the error and remounts the subtree whenever its value changes. + ## Next Steps - **[CLI](/docs/utilities/cli)** - Use CLI for rapid development