Created
October 7, 2017 03:50
-
-
Save tkssharma/b2c38561ac44f0bb9623ac69ca8a1617 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class BasicRouting extends Component { | |
render() { | |
return ( | |
<div> | |
<h1>BasicRouting</h1> | |
<div className="leftNavi"> | |
<ul> | |
<li><Link to={this.props.match.url +"/level1"} className="active">Level 1</Link></li> | |
<li><Link to={this.props.match.url + "/level2"} className="active">Level 2</Link></li> | |
</ul> | |
</div> | |
<div className="rightContent"> | |
<p>Second Level Content will appear here:</p> | |
<Route path={`${this.props.match.url}/:level`} component={Content}/> | |
</div> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment