'authStateChanges with .map()?

enter image description here

Hi guys, I’m trying to understand how authStateChanges().map(——) works. Does authStateChanges return some value and send it to map? which then passes through the function of returning the Userid or Null.

sorry if this is a basic question, I just can’t quite seem to understand how map() works and what’s going on in this code.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source