StateDefinitionBoundaryProps
interfaceImport
import { StateDefinitionBoundaryProps } from '@modular/sdk/view';Members4
- childrenoptional
ReactNode- observeStateDefinitions
(listener: () => void) => () => voidSubscribes to growth of the host's State definition set and returns an unsubscribe. `observeStateDefinitions` on the shell-facing view context.
- onError
(error: unknown) => voidReports a caught render failure. Wired to `ViewContext.diagnostics.failed`, which is the only channel the runtime graph and the eval harness read. A boundary that catches without reporting turns a genuinely broken component into a silently blank view.
- onSettled
(outcome: ViewRenderOutcome) => voidReports that a render attempt settled, and how. The `rendered` outcome is wired to `ViewContext.diagnostics.ready`, which is what makes readiness a claim about the tree rather than about control flow. Reaching the end of the shell's `start()` proves only that `root.render` was called — it returns before React commits, and the live-refresh path returns without rendering at all. Readiness asserted there is why a view with an empty `#root` reads as healthy and reports nothing to look at. A `rendered` outcome also retracts a failure this boundary already reported: a recovery nobody reports is, to the runtime graph, a transition that never happened, so a view that recovered reads exactly like one that never did. The `failed` outcome carries no diagnostic of its own — `onError` already reported the throw. It exists so the shell learns the attempt is over. A settlement signal that only fires on success leaves every host affordance keyed to it stuck in its pending state for exactly the views whose authors most need to see past it.