This is the my App() function in App.js, the comps :"Sidebar, Feed and Widgets" keeps rendering in route ="/"
and also ="/login"
as well, in addition to that "Login" comp didn't even render in route ="/login"
.
<Router>
<div className="app">
<Switch>
<Route path="/">
<Sidebar />
<Feed />
<Widgets />
</Route>
<Route path="/login">
<Login />
</Route>
</Switch>
</div>
</Router>