This action creates a new screen in a new stack and destroys all previous stacks.
The structure of ResetApplication
is:
Attribute | Type | Required | Definition |
---|---|---|---|
route | Route | ✓ | Navigation route. |
controllerId | String | The navigation controller id to use during the navigation action. If empty, the default navigation controller will be used. | |
navigationContext | NavigationContext | Context to be saved on the target screen. |
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)
)
)
)
)
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.