navigateOrElse
fun <Action : NavigationAction<*>> Navigator<Action>.navigateOrElse(action: Action, onFailure: () -> Unit)
Triggers a given NavigationAction or executes a closure if the navigation failed to complete.
Parameters
Action
The type of NavigationAction to be given.
action
The Action to trigger.
onFailure
Closure for handling case when navigation failed.