How can I ensure only logged in user to be able to access to home and task page? I'm using redux and I try to avoid any pre-made auth component to learn better about auth.
const App = props => (
<BrowserRouter>
<Provider store={store}>
<div className="app">
<Layout>
<Header>
<Navbar />
</Header>
<Content>
<Route exact path='/' component={Home} />
<Route exact path='/login' component={Login} />
<Route exact path='/signup' component={Signup} />
<Route exact path='/task/:id' component={Task} />
</Content>
</Layout>
</div>
</Provider>
</BrowserRouter>
)
I was using angular and there's middleware concept in route, but in react I'm lost. I think auth has nothing to do with redux's store? do I need to call to get the user detail's from api when the user navigate around the app?