ParseReact
ParseReact copied to clipboard
ParseReact.currentUser lost on simulator refresh
Hi
I'm able to login/signup and am observing ParseReact.currentUser and everything is working fine.
Though when I refresh on the iOS simulator this.data.user returns false and I have to signup/login again.
Am I right in thinking this is incorrect, and the session should still be there and the user still logged in?
Why would this not be saving?
Thanks
Jase
Hi Jase, here is my code and works fine, I can refresh, restart, the session will be persistent.
observe(props, state) {
return {
user: ParseReact.currentUser,
};
}
// Then I can use
let User = this.data.user;
if (User) {...}