title: How to Reset the stacks on tab change inside bottomTabNavigayor?
body: <p><a href="https://snack.expo.io/@supu/nested-navigator-reset" rel="nofollow noreferrer">Snack</a></p>
  <p>I have bottomTabNavigator in my tab and inside each tab I have stacks. I want to reset the stack whenever I click on another tab.</p>
  <p>Tab Navigator-</p>
  <p>Tab 1 - |_Stack Navigator</p>
  <pre><code>     - Screen 1
  
       - Screen 2
  </code></pre>
  <p>Tab 2 - |_Stack Navigator</p>
  <pre><code>     - Screen 3
  
       - Screen 4
  </code></pre>
  <p>Tab 3 - |_Stack Navigator</p>
  <pre><code>     - Screen 5
       - Screen 6
  </code></pre>
  <p>The present scenario is, . Suppose I am on tab 1 - I navigate to Screen 2 from screen 1 . Then I click to Tab 2 . Now if I again click on Tab 1, Screen 2 is showing instead of Screen 1.</p>
  <p>Similar thing is happening on each tab.</p>
  <p>I want to reset the tab on each tab click.</p>
  <p>Please help.</p>
  <p>I am using -</p>
  <p>&quot;dependencies&quot;: { &quot;@react-native-community/cli&quot;: &quot;^4.1.0&quot;, &quot;@react-native-community/masked-view&quot;: &quot;^0.1.6&quot;, &quot;@react-navigation/bottom-tabs&quot;: &quot;^5.0.5&quot;, &quot;@react-navigation/native&quot;: &quot;^5.0.5&quot;, &quot;@react-navigation/stack&quot;: &quot;^5.0.5&quot;, &quot;react&quot;: &quot;16.9.0&quot;, &quot;react-native&quot;: &quot;0.61.5&quot;, &quot;react-native-gesture-handler&quot;: &quot;^1.6.0&quot;, &quot;react-native-gifted-chat&quot;: &quot;^0.13.0&quot;, &quot;react-native-reanimated&quot;: &quot;^1.7.0&quot;, &quot;react-native-safe-area-context&quot;: &quot;^0.7.3&quot;, &quot;react-native-screens&quot;: &quot;^2.0.0-beta.7&quot;, },</p>