Closed penguyen1 closed 8 years ago
Upon Signup & Login, ref.onAuth( callback ); works in both components, but it does not work in Homepage Component (returns null) WHYYYYYYYYY???
ref.onAuth( callback );
null
shouldn't the user's auth state be accessible throughout all the components?
maybe I should pass in the uid to Homepage via this.props.user and utilize the user uid for all other queries that way.
this.props.user
solved using ref.getAuth( );
ref.getAuth( );
user auth is not logged in if returned value is null
Upon Signup & Login,
ref.onAuth( callback );
works in both components, but it does not work in Homepage Component (returnsnull
) WHYYYYYYYYY???shouldn't the user's auth state be accessible throughout all the components?
maybe I should pass in the uid to Homepage via
this.props.user
and utilize the user uid for all other queries that way.