This commit is contained in:
Infinite
2020-02-13 19:57:25 +01:00
parent 8fe6eb0d77
commit 750759e4bf
20 changed files with 120 additions and 100 deletions

View File

@@ -1,19 +1,22 @@
import React from "react";
interface IErrorBoundaryProps {
children?: React.ReactNode,
children?: React.ReactNode;
}
type ErrorInfo = {
componentStack: string,
componentStack: string;
};
interface IErrorBoundaryState {
error?: Error;
error?: Error;
errorInfo?: ErrorInfo;
}
export class ErrorBoundary extends React.Component<IErrorBoundaryProps, IErrorBoundaryState> {
export class ErrorBoundary extends React.Component<
IErrorBoundaryProps,
IErrorBoundaryState
> {
constructor(props: IErrorBoundaryProps) {
super(props);
this.state = {};