April 2020
Intermediate to advanced
716 pages
18h 55m
English
The lessons for a specific course will be rendered in a list—along with a tally of the total number of lessons—on the Course page below the other course details, as pictured in the following screenshot:

To render this list of lessons, we will update the Course component to iterate over the array of lessons with a map function, and each lesson will be displayed in a Material-UI ListItem component, as shown in the following code.
mern-classroom/client/course/Course.js
<List> {course.lessons && course.lessons.map((lesson, index) => { return(<span key={index}> <ListItem> <ListItemAvatar> <Avatar> {index+1} </Avatar> </ListItemAvatar> ...Read now
Unlock full access