I have made an application where I am implementing routing using react-router-dom.
So the scenario is when a user logs in, he is redirected to localhost:3000/home url and home page is getting rendered. When he logs out he is coming to landing page which is on localhost:3000.
But if the user changes the url to localhost:3000 when logged in, everything is coming blank and he is showing as logged in, I believe this is the default behavior of routing.
The requirement is, to redirect user to home page until he is logged in even if he changes url by typing to localhost in the browser.