interface ErrorBoundaryProps {
    children: ReactNode;
    fallback?: ReactNode;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
    recoveryAction?: () => void;
}

Properties

children: ReactNode

Child components to render or fallback UI on error.

fallback?: ReactNode

Optional custom fallback UI to display when an error is caught.

onError?: (error: Error, errorInfo: ErrorInfo) => void

Optional callback to handle errors when they occur.

recoveryAction?: () => void

Optional callback to customize recovery behavior.