Types
Types
The types of errors and loading.
ErrorFallbackProps
Interface
What errorFallback gets: the error, the screen, and retry, which renders the screen again. When the start failed, the screen is the first root it shows in, and retry runs the start again from willMount.
interface ErrorFallbackProps
| Member | Type | Description |
|---|---|---|
| errorRequired | unknown | |
| screenRequired | ScreenInfo | |
| retryRequired | () => void |
LoadingFallback
Type
What a screen shows while it waits for a lazy component or data.
type LoadingFallback = ComponentType<{ screen: ScreenInfo }>
NavigationErrorSource
Type
Where an error that goes to onError came from.
type NavigationErrorSource =
/** A screen failed to render: it shows `errorFallback`, or nothing, and the other screens go on. */
| { type: 'screen'; screen: ScreenInfo; componentStack?: string | null }
/**
* The app failed to start: `willMount` or the first root. `errorFallback` shows as the first screen, and its `retry`
* starts again; without it the splash screen stays, and the next launch tries again.
*/
| { type: 'start' }
/** A route of `linking` failed: its `start`, its `open`, or a command they made. The app goes on. */
| { type: 'link'; url: string }
| Member | Type | Description |
|---|---|---|
| typeRequired | 'screen' | |
| screenRequired | ScreenInfo | |
| componentStack | string | null | |
| urlRequired | string |