You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Why does createUserProfileDocument funcion in firebase is fired twice whenever a new user signs up?
It looks like a bug to me because this code seems to be in some kind of race condition. Why do we need to update firebase twice just to add displayName?
You will see that snapShot.exists in firebase is always false when the function is called from both App.js and SignUp component simultaneously.
I think both Sign In and Sign Up should have seperate createUserProfileDocument code.
Secondly, this.setState is not fired in handleSubmit to empty the state inside Sign Up component because Sign Up is already unmounted.
The text was updated successfully, but these errors were encountered:
Hello,
Why does createUserProfileDocument funcion in firebase is fired twice whenever a new user signs up?
It looks like a bug to me because this code seems to be in some kind of race condition. Why do we need to update firebase twice just to add displayName?
You will see that snapShot.exists in firebase is always false when the function is called from both App.js and SignUp component simultaneously.
I think both Sign In and Sign Up should have seperate createUserProfileDocument code.
Secondly, this.setState is not fired in handleSubmit to empty the state inside Sign Up component because Sign Up is already unmounted.
The text was updated successfully, but these errors were encountered: