title: How can I create a custom navigation drawer in react-native using react-navigation v5?
body: <p>I am looking to create a custom drawer navigator with a few expandable list views with a few hidden routes.</p>
  <p>E.g.</p>
  <p>Home</p>
  <p>Main1</p>
  <p>Hidden 1</p>
  <p>hid a</p>
  <p>hid b</p>
  <p>Hidden 2</p>
  <p>hid a</p>
  <p>hid b</p>
  <p>Where hid a and hid b would be hidden behind hidden 1 or hidden 2. When hidden 1 or hidden 2 is clicked or touched the hid a/hid b would be displayed.</p>
  <p>This is what I have so far --</p>
  <p>Main.js:</p>
  <pre><code>export default function MainScreen({ navigation }){
    
    return (
      &lt;NavigationContainer&gt;
        &lt;Drawer.Navigator initialRouteName='Home' drawerContent={props =&gt; &lt;Menu {... props} /&gt;}&gt;
          &lt;Drawer.Screen name=&quot;..&quot; options={{drawerIcon: config =&gt; &lt;Icon name=&quot;..&quot; size={22} color=&quot;#000&quot;&gt;&lt;/Icon&gt;}} component={HomeScreen} /&gt;
          &lt;Drawer.Screen name=&quot;Ex1&quot; component={Ex1} /&gt;
          &lt;Drawer.Screen name=&quot;Ex2&quot; component={Ex2} /&gt;
          &lt;Drawer.Screen name=&quot;Ex3&quot; component={Ex3} /&gt;
          &lt;Drawer.Screen name=&quot;Ex4&quot; component={Ex4} /&gt;
          &lt;Drawer.Screen name=&quot;Ex5&quot; component={Ex5} options={{
              title:&quot;..&quot;,
              drawerIcon: config =&gt; &lt;Icon
                  size={22}
                  name='..'&gt;&lt;/Icon&gt;
          }} /&gt;
        &lt;/Drawer.Navigator&gt;
      &lt;/NavigationContainer&gt;
    )
  }
  </code></pre>
  <p>Menu.js:</p>
  <pre><code>const Menu = (props) =&gt; {
  
    return (
      &lt;SafeAreaView style={{flex: 1}}&gt;
        &lt;DrawerContentScrollView {...props}&gt;
          &lt;DrawerItemList {...props} /&gt;
          
        &lt;/DrawerContentScrollView&gt;
  
      &lt;/SafeAreaView&gt;
    );
  };
  </code></pre>
  <p>And I'm looking to split out DrawerItemList so I can display a few of my routes within a dropdown.</p>
  <p>Much of the code in the samples above has been sanitised because a lot of it is commercially sensitive but I can assure you my component names etc are much better in the actual code.</p>
  <p>Any suggestions or comments would be much appreciated.</p>
  <p>I have just started working with react-native so bare with me.</p>
  <p>If you need any more info, please don't hesitate to comment and ask.</p>
  <p>Thanks in advance.</p>