March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's say that you have two item categories. When the user clicks on a category, the items in that category should be displayed. Here's the code to do this, by using the List component:
import React, { useState, Fragment } from 'react';import List from '@material-ui/core/List';import ListItem from '@material-ui/core/ListItem';import ListItemText from '@material-ui/core/ListItemText';import ListItemIcon from '@material-ui/core/ListItemIcon';import Collapse from '@material-ui/core/Collapse';import ExpandLessIcon from '@material-ui/icons/ExpandLess';import ExpandMoreIcon from '@material-ui/icons/ExpandMore';import InboxIcon from '@material-ui/icons/Inbox';import MailIcon from '@material-ui/icons/Mail';import ContactsIcon from ...Read now
Unlock full access