So, i need to reset navigation stack each time a tab is selected from the tab navigation. Right now it works like this:
User is on Tab A -> Opened New Screen (i.e. News) on Tab A -> Selected Tab B -> Selected Tab A and came back to last opened screen (News) instead of coming back to Tab A .
I need to change the last step and reset the opened screens each time user selects new Tab.
i know that there are few API items that i can use for it, like pop
, popToRoot
and resetTo
but i have no idea how to use it correctly.
Can someone give me an example that i can use it?
Thanks in advance!