xref: /expo/packages/expo-router/build/views/Try.d.ts (revision 26ad19fc)
1import React from 'react';
2/** Props passed to a page's `ErrorBoundary` export. */
3export type ErrorBoundaryProps = {
4    /** Retry rendering the component by clearing the `error` state. */
5    retry: () => Promise<void>;
6    /** The error that was thrown. */
7    error: Error;
8};
9export declare class Try extends React.Component<{
10    catch: React.ComponentType<ErrorBoundaryProps>;
11    children: React.ReactNode;
12}, {
13    error?: Error;
14}> {
15    state: {
16        error: undefined;
17    };
18    static getDerivedStateFromError(error: Error): {
19        error: Error;
20    };
21    retry: () => Promise<void>;
22    render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
23}
24//# sourceMappingURL=Try.d.ts.map