Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions content/docs/utilities/runner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

<ErrorBoundary>
<SchemaErrorBoundary>
<SchemaRenderer schema={schema} />
</ErrorBoundary>
</SchemaErrorBoundary>
```

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
Expand Down