I have this piece of code in my index.js :
const routing = (
<Router>
<div>
<Route path='/'>
<Redirect to="/login" />
</Route>
<Route path="/login" component={Login} />
<Route path="/signin" component={Signin} />
<Route path="/home" component={Home} />
</div>
</Router>
)
So what it should give me is, whenever I start it, it should land on http://localhost:3000/login or somewhere like it. What it does.
It gives me a login screen, where if I click on Login button it takes me to http://localhost:3000/home, which is also as I intended.
But whenever I directly try to access http://localhost:3000/home or http://localhost:3000/signin, it always takes me to http://localhost:3000/login.
What is the actual problem here? How this can be resolved ?