skip to Main Content

Javascript – How to display the current user display name in firebase using react

I'm trying to display the current user's name in my sidebar component in react. I tried this so far. import {auth, dataBase} from '../firebase-config.js'; function Sidebar() { const [firebaseUserInfo, setFirebaseUserInfo] = useState(auth.currentUser); return ( <div className='sidebar-container'> <header> <p>{firebaseUserInfo.displayName}</p> </header> </div>…

VIEW QUESTION
Back To Top
Search