UNPKG

@schema-render/core-react

Version:

Through a set of simple JSON Schema, efficiently build a set of forms.

24 lines (23 loc) 876 B
import type { PropsWithChildren } from 'react'; import { Component } from 'react'; import type { ICore } from '../typings/core'; interface IErrorBoundaryState { hasError: boolean; error: Error; } interface IErrorBoundaryProps { catchErrorTips?: ICore['catchErrorTips']; } export default class ErrorBoundary extends Component<PropsWithChildren<IErrorBoundaryProps>, IErrorBoundaryState> { static getDerivedStateFromError(error: Error): { hasError: boolean; error: Error; }; state: { hasError: boolean; error: Error; }; getFallback(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | null | undefined; render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | null | undefined; } export {};