Too Long; Didn't Read
After many months of React Native development, I’ve been acquainted with building an <a href="https://www.youtube.com/watch?v=0TlOhmdl3-M&list=PLkOyNuxGl9jzR1VoEcBritiKfG0Ejtt54&index=2&t=1328s" target="_blank">authentication workflow between Firebase and React Navigation</a>. 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 href="https://reactjs.org/blog/2018/03/29/react-v-16-3.html" target="_blank">a fantastic new Context API</a> that will help us with that.