Skip to content

Instantly share code, notes, and snippets.

@meiriko
Created January 12, 2019 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meiriko/35c6ac1f85944a363a7a6d76cd715f64 to your computer and use it in GitHub Desktop.
Save meiriko/35c6ac1f85944a363a7a6d76cd715f64 to your computer and use it in GitHub Desktop.
import {Route, Link, Switch} from './RelativeRouting';
const RRExample = () => <div>
<Link relative to="/more">Show more</Link>
<Link relative to="/more/summary">Show more (summary)</Link>
<Link to="/home">go to home (absolute)</Link>
<Switch>
<Route to="/more/summary" component={ShowSummary}/>
<Route to="/more" component={ShowDetails}/>
</Switch>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment