schema-components - v3.7.0
    Preparing search index...

    React error boundary that catches rendering errors from SchemaComponent, theme adapters, and any descendant.

    Provides a reset callback that clears the error state, allowing the children to re-render (e.g. after fixing a bad schema prop). Does not catch errors thrown from event handlers, async work, or server-side rendering — those paths must be handled by the host application.

    <SchemaErrorBoundary fallback={(error) => <p>{error.message}</p>}>
    <SchemaComponent schema={userSchema} value={user} onChange={setUser} />
    </SchemaErrorBoundary>

    Hierarchy

    Index

    Constructors

    Properties

    state: ErrorBoundaryState = ...

    Methods

    • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

      Parameters

      • error: Error

      Returns void