In my WordPress project i need to develop an application that has a module about user profile. In WordPress there is a hook is_user_logged_in()
to check if user is logged in or not. But now what is a flow to use this functionality into reactJS. As my profile data is rendering from header.jsx file.
if(user logged in){
"then user profile will display"}
else{
"user login screen will display"
}
You can do this by following the next steps:
is_user_logged_in()
and send response true or false.