New to react & react-router. I am using react-router-4
I have following components - Login - Home - Header - Sidebar - Content
Login component does not have either Header or Sidebar.
This is how I am routing
App.js
<Switch>
<Route exact path='/login' component={Login}/>
<Route exact path='/home' component={Home}/>
</Switch>
And then in my Home Component, I have Sidebar and Content.
Home.js render method
<Grid>
<Grid.Row>
<Grid.Column width={3}>
<SideBar/>
</Grid.Column>
<Grid.Column width={13}>
<Route exact path='/home/dashboard' render={() => <div>Home</div>} />
</Grid.Column>
</Grid.Row>
</Grid>
The SideBar component has a Link which has 'to' value '/home/dashboard'.
Unfortunately, this does not work. On clicking the SideBar Link, a blank page loads.
According to my understanding, in react router 4, you can render a Route anywhere in your Router hierarchy. This is what I am trying to achieve by rendering a Route in 'Grid.Column width={13}' div.
What am I missing here?