April 2020
Intermediate to advanced
716 pages
18h 55m
English
The EditProfile component in client/user/EditProfile.js has similarities in its implementation to both the Signup and Profile components. It allows the authorized user to edit their own profile information in a form similar to the signup form, as shown in the following screenshot:

Upon loading at '/user/edit/:userId', the component will fetch the user's information with their ID after verifying JWT for auth, and then load the form with the received user information. The form will allow the user to edit and submit only the changed information to the update fetch call, and, on successful update, redirect the user to ...