Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- componentWillMount() {
- firebase.auth().onAuthStateChanged((user) => {
- if (user) {
- setState({user})
- }
- });
- }
- comonentDidMount() {
- let notificationsPath = 'users' + this.state.user.id + 'notifications'
- // then do your firebase request for notifcations
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement