-
Notifications
You must be signed in to change notification settings - Fork 405
Closed
Labels
Description
I'm fairly new at React, so this could be the wrong design entirely, but:
It looks like a good way to handle authentication is to write:
componentWillMount() {
firebaseRef.onAuth(auth => this.setState({auth: auth}));
},
componentWillUnmount() {
firebaseRef.offAuth(...);
},It would be nice if ReactFire would handle dropping the current authentication state into a component's state, instead of needing this custom code.