April 2020
Intermediate to advanced
716 pages
18h 55m
English
In the MyCourses component, we will render the list of courses in a Material-UI List, after fetching the data from the server using the listByInstructor API. This component, as pictured in the following image, will function as the educator's dashboard, where their courses are listed and they have an option to add new courses:

In order to implement this component, we first need to fetch and render the list of courses. We will make the fetch API call in the useEffect hook, and set the received courses array in the state, as shown next.
mern-classroom/client/course/MyCourses.js
export default function MyCourses(){ const ...Read now
Unlock full access