我有一个登录表单,在填写此表单时,我希望将值存储在数据库中,然后它应该导航到确认页面。问题是正在存储空白值
PS:导航在没有数据库插入功能的情况下可以正常传递值。
userLogin(email, password) {
firebase.database().ref('users/').set({
userEmail: email,
userPass: password,
}).catch((error)=>{
console.log('error ' , error)
});
}
<Button
title="Go to Details"
onPress = {this.userLogin(this.state.email, this.state.password),
this.props.navigation.navigate('Details', {
email: this.state.email,
password: this.state.password,
title: "Details Screen",
})
}
/>