【发布时间】:2019-04-13 18:17:32
【问题描述】:
我发现在 React Native 中更新配置文件 firebase 时出现问题,我尝试查找示例但全部失败,也许您可以给我建议或者更正我的脚本。
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);
});
我尝试遵循所有示例,在警报中显示消息“user.updateProfile 不是函数”。
请任何人帮助我如何在 React Native 中更新配置文件 (displayName) firebase。
谢谢。
【问题讨论】:
标签: javascript firebase react-native firebase-authentication