Skip to content

Instantly share code, notes, and snippets.

@timdorr
Last active January 27, 2016 21:40
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 timdorr/ce0ef31283771f52ddca to your computer and use it in GitHub Desktop.
Save timdorr/ce0ef31283771f52ddca to your computer and use it in GitHub Desktop.
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