Types
The types of lifecycle and events.
NavigationEvents
The events of the navigation by name, with what each one gets; the events of a screen carry it as screen.
interface NavigationEvents
| Member | Type | Description |
|---|---|---|
| screenWillAppearRequired | ScreenEventOf<ComponentWillAppearEvent> | A screen is about to appear; the components of the bars (title, buttons, background) are not screens. |
| screenDidAppearRequired | ScreenEventOf<ComponentDidAppearEvent> | A screen appeared. |
| screenDidDisappearRequired | ScreenEventOf<ComponentDidDisappearEvent> | A screen disappeared: something covers it, or it left. |
| screenPoppedRequired | ScreenEventOf<NativeScreenPoppedEvent> | A screen left its stack by back, a swipe or |
| buttonPressedRequired | ScreenEventOf<NavigationButtonPressedEvent> | |
| tabSelectedRequired | BottomTabSelectedEvent | |
| tabPressedRequired | BottomTabPressedEvent | |
| tabLongPressedRequired | BottomTabLongPressedEvent | |
| modalDismissedRequired | ScreenEventOf<NativeModalDismissedEvent> | |
| modalDismissAttemptedRequired | ScreenEventOf<ModalAttemptedToDismissEvent> | A swipe tried to dismiss a modal whose screen keeps the user ( |
| searchChangedRequired | ScreenEventOf<SearchBarUpdatedEvent> | |
| searchSubmittedRequired | ScreenEventOf<SearchBarSubmittedEvent> | |
| searchCancelledRequired | ScreenEventOf<SearchBarCancelPressedEvent> | |
| searchSuggestionPickedRequired | ScreenEventOf<NativeSearchSuggestionPickedEvent> | The user picked a suggestion of |
| sheetDetentChangedRequired | ScreenEventOf<NativeSheetDetentChangedEvent> | The user dragged a sheet to another detent. |
| splitViewDisplayModeChangedRequired | NativeSplitViewDisplayModeChangedEvent | iOSiPadOSAndroid (not supported) |
| keyCommandPressedRequired | ScreenEventOf<NativeKeyCommandPressedEvent> | |
| titleRenamedRequired | ScreenEventOf<NativeTitleRenamedEvent> | iOSiPadOSAndroid (not supported) |
| accessoryPlacementChangedRequired | BottomAccessoryPlacementChangedEvent | iOS 26+iPadOS 26+Android (not supported) |
| previewCompletedRequired | ScreenEventOf<NativePreviewCompletedEvent> | iOSiPadOSAndroid (not supported) |
| stateChangedRequired | NavigationState | What the user sees changed: the screen or the selected tab. |
NavigationEventName
type NavigationEventName = keyof NavigationEvents
NavigationListeners
Handlers of the events of the navigation, by event name.
type NavigationListeners = {
[Name in NavigationEventName]?: (event: NavigationEvents[Name]) => void;
}
ScreenEventName
The events a screen hears about itself: those that carry the screen, and the move of the accessory it shows.
type ScreenEventName =
| {
[Name in NavigationEventName]: NavigationEvents[Name] extends { screen: unknown }
? Name
: never;
}[NavigationEventName]
| 'accessoryPlacementChanged'
NavigationState
What the user sees: the screen and the selected tab. The native side sends it when it changes, and before a command that changed it resolves.
type NavigationState = NavigationStateChangedEvent
| Member | Type | Description |
|---|---|---|
| screenRequired | { id: string; name: string } | null | The visible screen with its name in |
| tabRequired | number | null | The index of the selected tab of the nearest tabs around the visible screen, or |
ScreenWillAppearEvent
type ScreenWillAppearEvent = NavigationEvents['screenWillAppear']
| Member | Type | Description |
|---|---|---|
| screenRequired | ScreenRef |
ScreenDidAppearEvent
type ScreenDidAppearEvent = NavigationEvents['screenDidAppear']
| Member | Type | Description |
|---|---|---|
| screenRequired | ScreenRef |
ScreenDidDisappearEvent
type ScreenDidDisappearEvent = NavigationEvents['screenDidDisappear']
| Member | Type | Description |
|---|---|---|
| screenRequired | ScreenRef |