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:
This profile information can be fetched from the server only if the user is signed in, and to verify this, the component has to provide the JWT to the read fetch call, otherwise, the user should be redirected to the Sign In view.
In the Profile component definition, we first need to initialize the state with an empty user and set redirectToSignin to false.
mern-skeleton/client/user/Profile.js:
class Profile extends Component { constructor({match}) ...