Where to place firebase.auth().onAuthStateChanged() Where to place firebase.auth().onAuthStateChanged() typescript typescript

Where to place firebase.auth().onAuthStateChanged()


You should locate it where you create redux store, should be where you render your App component.You can look here for more details.If you use firebase a lot I recommend to invest some time to set-up this great library react-redux-firebase