UNPKG

@airplane/views

Version:

A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.

21 lines (20 loc) 725 B
import { Component, ErrorInfo, ReactNode } from "react"; export type Props = { children: ReactNode; fallback?: ReactNode; }; /** * ErrorBoundary is a component that catches errors in its children and displays a fallback UI. * * This is used in the builder to wrap the entire View to catch any errors that aren't caught by * component error boundaries. */ export declare class ErrorBoundary extends Component<Props, { error?: Error; errorInfo?: ErrorInfo; errorID?: string; }> { constructor(props: Props); componentDidCatch(error: Error, errorInfo: ErrorInfo): void; render(): string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined; }