Skip to content

Instantly share code, notes, and snippets.

@timdorr

timdorr/routes.js

Created Jan 27, 2016
Embed
What would you like to do?
Some common routes (taken from the react-router examples)
import { Route } from 'react-router'
import App from 'components/App'
import Page1 from 'components/Page1'
import Page2 from 'components/Page2'
import Tab1 from 'components/Tab1'
import Tab2 from 'components/Tab2'
export default const routes = (
<Route path="/" component={App}>
<Route path="page1" component={Page1}>
<Route path="tab1" component={Tab1} />
<Route path="tab2" component={Tab2} />
</Route>
<Route path="page2" component={Page2}>
<Route path="tab1" component={Tab1} />
<Route path="tab2" component={Tab2} />
</Route>
</Route>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.