Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. componentWillMount() {
  2.  
  3. firebase.auth().onAuthStateChanged((user) => {
  4. if (user) {
  5. setState({user})
  6. }
  7. });
  8.  
  9. }
  10.  
  11. comonentDidMount() {
  12.  
  13. let notificationsPath = 'users' + this.state.user.id + 'notifications'
  14.  
  15. // then do your firebase request for notifcations
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement