I found a problem to update profile firebase in React Native, I try to look for example but fails all, maybe you can give me advices or you can correct my script.
firebase.auth().createUserWithEmailAndPassword(this.state.email, this.state.password)
.then(
(user)=>{
if(user){
user.updateProfile({
displayName: 'Frank S. Andrew'
}).then((s)=> {
this.props.navigation.navigate('Account');
})
}
})
.catch(function(error) {
alert(error.message);
});
I try to follow all examples, in the alert shows message 'user.updateProfile is not a function'.
Please anyone help me how to update profile (displayName) firebase in React Native.
Thanks.