Pilates
    Preparing search index...

    Interface ErrorBoundaryProps

    interface ErrorBoundaryProps {
        children?: ReactNode;
        fallback?: ErrorBoundaryFallback;
        onError?: (error: Error, info: ErrorBoundaryInfo) => void;
        resetKeys?: readonly unknown[];
    }
    Index

    Properties

    children?: ReactNode

    Rendered when a descendant throws during render. Either a static ReactNode or a function (error, reset) => ReactNode. If omitted, the default fallback renders a red-bordered "Render error" panel with the error message.

    onError?: (error: Error, info: ErrorBoundaryInfo) => void

    Called once per caught error. Use for logging / telemetry / writing to stderr. Throws inside onError are swallowed so reporting failures do not mask the original error.

    resetKeys?: readonly unknown[]

    When any element of this array changes (referential !==), the boundary clears its caught error and re-mounts its children. Use to recover from an error once the upstream cause has been fixed (e.g. user re-typed a valid value, network came back).