When you have lots of items in your Drawer, you might want to divide your drawer into sections. When you have lots of drawer items and no sections, you end up having to put section names into the items themselves, which leads to messy and awkward drawer item labels.
Drawer sections
How to do it...
Let's say that you're working on an app that has screens for managing different aspects of the CPU, memory, storage, and network. Instead of having a flat list of drawer items, you could display drawer items in their relevant sections, making it easier to navigate. Here's the code to do it:
import React, { useState } from 'react';
import { withStyles } from '@material-ui/core/styles';
import Drawer...