Skip to main content
‹ Errors and loading
Types

Types

The types of errors and loading.

SectionErrors and loadingDraftDocumented, not reviewed yet: the API can change.

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
MemberTypeDescription
errorRequiredunknown
screenRequiredScreenInfo
retryRequired() => void
Defined in src/api/screens/ScreenBoundary.tsx ↗

LoadingFallback​

Type

What a screen shows while it waits for a lazy component or data.

type LoadingFallback = ComponentType<{ screen: ScreenInfo }>
Defined in src/api/screens/registerScreens.tsx ↗
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 }
MemberTypeDescription
typeRequired'screen'
screenRequiredScreenInfo
componentStackstring | null
urlRequiredstring
Defined in src/api/app/createNavigation.ts ↗