T

Navigation

A screen's handle on Discord's React Navigation stack, as useNavigation returns it.

type Navigation<T = any> = { … }

Members

addListener(event: string, callback: DiscordFunction) => DiscordFunction<void>

Subscribes to a navigation event, such as focus; returns a function that unsubscribes.

goBack() => void

Returns to the previous screen.

pop() => void

Removes the top screen from the stack.

push(route: string, params?: T) => void

Pushes a new screen for route with params onto the stack.

setOptions(options: NavigationOptions) => void

Updates the current screen's header options.