Based on the isLoggedIn
I need to route to different components.
I'm getting the login page but not able to render homepage.
{this.state.isLoggedIn ?
(
<Route
path='/home'
render={() => <HomePage onLogout={this.onLogout} />}
/>
)
:
(
<Route exact path='/' component={() => <LoginPage onLogin={this.onLogin} />}/>
)
}