JavaScript for WordPress › Forums › React Explained › Refactoring stage issues › Reply To: Refactoring stage issues
May 13, 2019 at 8:30 pm
#107527
GPorter43
Participant
I found one thing on the app service which didn’t work but wasn’t that
in appService.js
you have
logout() {
return firebase.auth.signOut();
}
i got it working with
logout() {
return firebase.auth().signOut();
}
in App.js
you have
onLogout = () => {
this.props.appService
.signOut()
.then(() => {
this.setState({ isAuthenticated: false });
})
.catch(error => console.error(error));
};
i got it working with
onLogout = () => {
this.props.appService
.logout()
.then(() => {
this.setState({ isAuthenticated: false });
})
.catch(error => console.error(error));
};