title: Dismissing the Drawer header when open specific screen in stack navigation in react native
body: <p>I am building a react native app, I have used both drawer navigation and stack navigation. The problem is that, I cam enable drawer header in all stacked screens or not, but I need to show the drawer header only in two stacked screen and disabled in others. How can I show Drawer header where I only need the stack navigation header ??
  I can't use <code>&lt;Drawer.Screen options={{headerShown: false}} /&gt;</code>
  as this will disable drawer header from all stacked screen</p>
  <p>Stack Navigator</p>
  <pre><code>   import React from &quot;react&quot;;
      import { createStackNavigator } from &quot;@react-navigation/stack&quot;;
      
      //The pages to navigate between in stack
              
      import {Home} from &quot;../components/Home&quot;;
      import {Notes} from &quot;../components/Notes&quot;;
      
      //Default Title holders
              
      import * as DefaultTitle from &quot;../components/DefaultTitles&quot;;
      
      //Creating navigation constant 
              
      const Stack = createStackNavigator();
      
      export function MainStack(){
          return(
                  &lt;Stack.Navigator&gt;
  // I want to show drawer header only in this screen 
                      &lt;Stack.Screen
                          name={DefaultTitle.HomeTitle}
                          component={Home} 
      
              options={{headerTitleAlign: &quot;center&quot;, headerShown: false,}} /&gt;
  // I want to show stack header only in this screen                 
                      &lt;Stack.Screen name=&quot;Notes&quot; component={Notes} /&gt;
                  &lt;/Stack.Navigator&gt;
          );
      }
  </code></pre>
  <p>Drawer Navigation</p>
  <pre><code>import React from &quot;react&quot;;
  import { createDrawerNavigator } from &quot;@react-navigation/drawer&quot;;
  
  //imported pages
  import {MainStack} from &quot;./MainStack&quot;;
  import {AboutStack} from &quot;./AboutStack&quot;;
  
  //Default holders
  import * as DefaultTitle from &quot;../components/DefaultTitles&quot;;
  
  //Creating navigation constant
  const Drawer = createDrawerNavigator();
  
  export default function DrawerStack(){
      return(    
          &lt;Drawer.Navigator &gt;
              &lt;Drawer.Screen name=&quot;Home&quot; component={MainStack}/&gt;
              &lt;Drawer.Screen name=&quot;About&quot; component={AboutStack} /&gt;
          &lt;/Drawer.Navigator&gt; 
      )
  }
  </code></pre>
  <p>app.js</p>
  <pre><code>import React from &quot;react&quot;;
  import { NavigationContainer } from &quot;@react-navigation/native&quot;;
  
  //imported Main Route
  import DrawerStack from &quot;./navigationRoutes/DrawerStack&quot;;
  
  export default function App() {
    return (
       &lt;NavigationContainer&gt;
          &lt;DrawerStack /&gt;
       &lt;/NavigationContainer&gt;
    );
  }
  </code></pre>