Skip to content

API Reference / @gtkx/navigation / StackActionHelpers

Type Alias: StackActionHelpers<ParamList> ​

StackActionHelpers<ParamList> = object

Type Parameters ​

ParamList ​

ParamList extends ParamListBase

Methods ​

pop() ​

pop(count?): void

Pop a screen from the stack.

Parameters ​

count? ​

number

Returns ​

void


popTo() ​

popTo<RouteName>(...args): void

Pop any screens to go back to the specified screen. If the specified screen doesn't exist, it'll be added to the stack.

Type Parameters ​

RouteName ​

RouteName extends string | number | symbol

Parameters ​

args ​

...RouteName extends unknown ? undefined extends ParamList[RouteName] ? [RouteName, ParamList[RouteName], object] : [RouteName, ParamList[RouteName], object] : never

Returns ​

void


popToTop() ​

popToTop(): void

Pop to the first route in the stack, dismissing all other screens.

Returns ​

void


push() ​

push<RouteName>(...args): void

Push a new screen onto the stack.

Type Parameters ​

RouteName ​

RouteName extends string | number | symbol

Parameters ​

args ​

...RouteName extends unknown ? undefined extends ParamList[RouteName] ? [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] : never

Returns ​

void


replace() ​

replace<RouteName>(...args): void

Replace the current route with a new one.

Type Parameters ​

RouteName ​

RouteName extends string | number | symbol

Parameters ​

args ​

...RouteName extends unknown ? undefined extends ParamList[RouteName] ? [RouteName, ParamList[RouteName]] : [RouteName, ParamList[RouteName]] : never

Returns ​

void