title: how hidden Bottom Tabs Navigator in React native Navigation V6
body: <p>I used <a href="https://reactnavigation.org" rel="nofollow noreferrer" title="I used React Navigation 6">React Navigation V6</a> in <strong>React Native</strong><br />
  The page1 is my login page where I need to hide the <strong>tab bar bottom</strong> on this page and some pages.
  But this code does not work for me<br />
  Can you Help me what the problem ?<br />
  Thankful</p>
  <p><a href="https://snack.expo.dev/@mohammad_askarzadeh/stack-navigator-%7C-react-navigation" rel="nofollow noreferrer" title="snack expo Code">snack expo Code</a></p>
  <pre><code>  function MainStackScreen({route, navigation }) {
  
      //  if (route.state &amp;&amp;  route.state.index == 0) {
        if (route.state &amp;&amp; route.state.routes[route.state.index].name == &quot;Page1&quot;) {
            navigation.setOptions( {tabBarVisible: false});
            Alert.alert(&quot;OK&quot;);
        
        } else {
          navigation.setOptions( {tabBarVisible: true});
          Alert.alert(&quot;NO&quot;);
        }
  </code></pre>