Skip to content

Instantly share code, notes, and snippets.

@timdorr

timdorr/reroutes.js

Last active Jan 27, 2016
Embed
What would you like to do?
An idea for a new kind of router in React.
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 = (
<App path="/">
<Page1 path="page1">
<Tab1 path="tab1" />
<Tab2 path="tab2" />
</Page1>
<Page2 path="page2">
<Tab1 path="tab1" />
<Tab2 path="tab2" />
</Page2>
</App>
)
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.