@commercelayer/react-components
Version:
The Official Commerce Layer React Components
15 lines (14 loc) • 408 B
TypeScript
import { Component, type ErrorInfo, type JSX } from 'react';
interface Props {
children: JSX.Element;
}
interface State {
hasError: boolean;
}
export declare class ErrorBoundary extends Component<Props, State> {
state: State;
static getDerivedStateFromError(): State;
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
render(): JSX.Element;
}
export default ErrorBoundary;