Skip to content

Instantly share code, notes, and snippets.

@tkssharma
Created October 7, 2017 03:55
Show Gist options
  • Save tkssharma/2fc85e73a3d946ec027b748fad7d4dad to your computer and use it in GitHub Desktop.
Save tkssharma/2fc85e73a3d946ec027b748fad7d4dad to your computer and use it in GitHub Desktop.
render() {
const { location, pattern, match, isExact } = this.props
return (
<div>
<h1>Reading the query parameters.</h1>
<div className="leftNavi">
<ul>
<li><Link to={{
pathname: match.url+'/level1',
search: '?abc=23'
}} className="active">Level 1</Link></li>
</ul>
</div>
<div className="rightContent">
<p>Second Level Content will appear here:</p>
<Switch>
<Route path={`${match.url}/:level`} component={Content}/>
</Switch>
</div>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment