【发布时间】:2019-08-05 10:29:25
【问题描述】:
我正在尝试在我的 react-native 项目中使用 firebase 来进行用户登录/注销过程。当我单击该按钮时, firebase.auth().SignInWithEmailAndPassword 函数被执行,但它给出了错误,它说“c.call 不是函数”,这发生在 auth.js 中。
我找不到任何有关该错误的相关答案。
[错误截图] (https://ibb.co/TPQCFZr)
onButtonClick() {
const { email, password } = this.state;
this.setState({ error: '', loading: true });
firebase.auth().signInWithEmailAndPassword(email, password)
.then(this.onLoginSuccess.bind(this))
.catch(
firebase.auth().createUserWithEmailAndPassword(email, password)
.then(this.onCreateSuccess.bind(this))
.catch(this.onLoginFail.bind(this))
);
}
【问题讨论】:
标签: javascript firebase react-native