Integrating #firebase #authentication with #react Router in React 16.3
▻https://hackernoon.com/integrating-firebase-authentication-with-react-router-in-react-16-3-92f5
▻https://medium.com/media/23d780ad25b9d0a143198553201dbe25/hrefAfter many months of React Native development, I’ve been acquainted with building an authentication workflow between Firebase and React Navigation. Lately I was looking to do the same but in ReactJS. The only difference between the web and the native use case is that, on a web app, the user can try to access a navigation state directly via the URL so you need to protect your components. Luckily, React 16.3 now provides a fantastic new Context API that will help us with that.We first create a Firebase auth context that contains two values:authStatusReported indicates if Firebase has reported the auth status. If the auth status hasn’t been reported yet, you might want to display a loading indicator for your app.isUserSignedIn (...)