How to use stack navigation in side drawer navigation with header in react navigation v6

Viewed 42

i am using the React navigation version 6 and i want to header of navigation with drawer and Stack but when i use stack in drawer navigation then shows to two header the below is code which i write

const StockStack = createNativeStackNavigator();

 const StockScreen = ({ navigation }) => (
  <StockStack.Navigator>
    <StockStack.Screen name="StockList" component={StockList} />
    <StockStack.Screen name="StockItemDetail" component={StockItemDetail}/>
   </StockStack.Navigator>
)

and this the drawer navigation

  return (
    
    <Drawer.Navigator drawerContent={ props => <SideMenu {...props}  /> }>
     <Drawer.Screen name="StockScreenList" component={StockScreen} />  
     </Drawer.Navigator>

       );

any can help you can i remove the drawer header

enter image description here

0 Answers
Related