Media edit form

The media edit form will be similar to the new media form, but without the upload option, and the fields will be pre-populated with the existing details:

The EditMedia component containing this form, which can only be accessed by signed-in users, will be rendered at '/media/edit/:mediaId'. This private route will be declared in MainRouter with the other frontend routes.

mern-mediastream/client/MainRouter.js:

<PrivateRoute path="/media/edit/:mediaId" component={EditMedia}/>

Once the EditMedia component mounts on the view, a fetch call will be made to the read media API to retrieve the media details and set to state so the values ...

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.