The Profile component

The Profile component in client/user/Profile.js shows a single user's information in the view at the '/user/:userId' path, where the userId parameter represents the ID of the specific user. The completed Profile will display user details, and also conditionally show edit/delete options. The following screenshot shows how the Profile renders when the user currently browsing is viewing someone else's profile and not their own profile:

This profile information can be fetched from the server if the user is signed in. To verify this, the component has to provide the JWT credential to the read fetch call; otherwise, the user ...

Get Full-Stack React Projects - Second Edition 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.