My React Native app has this structure:
- Bottom Tabs Navigator
- Stack Navigator 1
- Screen A
- Screen B
- Stack Navigator 2
- Stack Navigator 1
So I click on Stack Navigator 1 from the bottom tab navigator and go to Screen A, to Screen B, then close it. When I click Stack Navigator 1 again, Screen B shows up. What is the best way to "reset" it so every time I open Stack Navigator 1, Screen A shows up?
The current code in the Bottom Tabs Navigator:
<Tab.Navigator>
<Tab.Screen
name="Stack"
component={StackNavigator1}
/>
<Tab.Screen
name="Other"
component={Other}
/>
/>
Making Screen A the initial route of StackNavigator does not work.