[英]why this javascript code don't work after i reload part of my page with ajax?
[英]why my sign up page don't work even i enter my fire base code correctly
当我尝试注册时出现此错误
this.props.firebase.signupwithemail 不是函数。(在'_this.props.firebase.signupWithEmail(email,password)', '_this.props.firebase.signupWithEmail'未定义)
那是我的代码
handleOnSignup = async (values, actions) => {
const { name, email, password } = values
try {
const response = await this.props.firebase.signupWithEmail(
email,
password
)
if (response.user.uid) {
const { uid } = response.user
const userData = { email, name, uid }
await this.props.firebase.createNewUser(userData)
this.props.navigation.navigate('App')
}
} catch (error) {
// console.error(error)
actions.setFieldError('general', error.message)
} finally {
actions.setSubmitting(false)
}
改变这个:
this.props.firebase.signInWithEmail
进入这个:
this.props.firebase.signInWithEmailAndPassword
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.