matrix-react-sdk
Version:
SDK for matrix.org using React
21 lines (20 loc) • 645 B
TypeScript
import React, { ErrorInfo, ReactNode } from "react";
interface Props {
children: ReactNode;
}
interface IState {
error?: Error;
}
/**
* This error boundary component can be used to wrap large content areas and
* catch exceptions during rendering in the component tree below them.
*/
export default class ErrorBoundary extends React.PureComponent<Props, IState> {
constructor(props: Props);
static getDerivedStateFromError(error: Error): Partial<IState>;
componentDidCatch(error: Error, { componentStack }: ErrorInfo): void;
private onClearCacheAndReload;
private onBugReport;
render(): ReactNode;
}
export {};