ResetApplication

ResetApplication action details and its attributes

What is it?

This action creates a new screen in a new stack and destroys all previous stacks.

The structure of ResetApplication is:

AttributeTypeRequiredDefinition
routeRouteNavigation route.
controllerIdStringThe navigation controller id to use during the navigation action. If empty, the default navigation controller will be used.
navigationContextNavigationContextContext to be saved on the target screen.

How to use it?

Below is an example of a simple screen with a button that performs the ResetApplication action when clicked. To test it, just list the URL of the screen you want to create and click the button. The screen will be created in a new stack, and all other stacks will be destroyed

Screen(
    child = Button(
        text = "Click me!",
        onPress = listOf(
            Navigate.ResetApplication(
                Route.Remote(NEW_SCREEN_ENDPOINT)
            )
        )
    )
)

Last modified March 7, 2022: fix: Update docs 2.0 (#858) (4368557d)