@kushweez I had the same issues while building my app and came to the conclusion that the stack navigator is a disaster in many ways. What you need can be done with tab navigators; I have implemented it in my app and it works flawlessly on both iOS and Android. Here is what you need to do:
- Use tab navigators (both top and bottom work fine. I use bottom).
- Hide their navigation icons and use the “Navigate to” block to move between screens.
- Have a “Back” button on every screen except the root one of course.
- If you have screens that are in “order” (i.e. A takes you to B, B takes you to C, C takes you to D), you will need to create tab navigators within tab navigators (that is the trick really, it is not obvious but when you realize it, it works perfectly). In my case, I have a root screen with buttons that take you to sub-screens but no deeper than that so I only need one tab navigator.
Edit: What you need to understand about tab navigators is that each has one screen it will default to when you hit the “Back” button on your Android device. So for example, let’s say you have a tab navigator with 3 screens (A, B, C) and you use buttons to navigate from A to B and from B to C, when you get to screen C and hit the back button (or gesture) on your Android device, it will take you to screen A, not screen B as you would expect. This is the behavior you need to tackle by nesting tab navigators so in this example you need to create a tab navigator to host screens B and C so when you hit the back button while on screen C, it will return you to screen B (and not screen A) as B is now the “default” screen for the nested tab navigator. That is basically what took me countless hours of trial and error to understand until I finally got it right.