currently building react & back4app project. when a user signs in and navigates to a new page they are automatically signed out and have to log back in again. I am using the currentUser method and wondering do i need to call this on every page to keep the user signed in.
// Function that will return current user and also update current username
const getCurrentUser = async function () {
const currentUser = await Parse.User.current();
// Update state variable holding current user
setCurrentUser(currentUser);
return currentUser;
};