April 2020
Intermediate to advanced
716 pages
18h 55m
English
Users will be able to edit the details of each field in a lesson in the EditCourse component. In the view, each item in the list of lessons will contain three TextFields for each of the fields in a lesson. These will be prepopulated with the existing values of the fields as shown in the following code.
mern-classroom/client/course/EditCourse.js
<ListItemText primary={<><TextField label="Title" type="text" fullWidth value={lesson.title} onChange={handleLessonChange('title', index)} /> <br/> <TextField multiline rows="5" label="Content" type="text" fullWidth value={lesson.content} onChange={handleLessonChange('content', index)}/> <br/> <TextField label="Resource link" type="text" fullWidth value={lesson.resource_url} ...Read now
Unlock full access