redirection not working from root path "/" (react-router v6)
I am using react-router version ^6.25.1 , I want the user to be redirected to the home page /home if he logged in before i am using firebase-auth I check if the user is logged in via onAuthStateChanged observer provided by firebase if there is a user logged the promise is resolved if not it gets reject i am using a loader function to do this check if i call the loader function in my root "/" element the page keeps loading and I am not redirected however if i do that in other pages such as "/LoginPage" i am able to redirect to the home page /home
1 Reply