Version: 7.32.1
Interact programmatically with the Stack
The Navigation object provides ways to programmatically manipulate the stack.
#
Interact with the Stack by componentIdEach layout pushed into the stack has an id. When in the context of a component, The component's componentId
can be used to interact with a parent stack.
When using a component's componentId, the native implementation knows to perform the command on the parent Stack of this component.
In this example, we push a screen onto the component's parent stack.
#
Interact with the Stack by a predefined idSometimes we're required to interact with a specific stack not from the context of a component pushed into it. To do so, assign the stack a predefined id
and use it when invoking any stack command.