Skip to content

Instantly share code, notes, and snippets.

@kuy
Created January 4, 2017 15:41
Show Gist options
  • Save kuy/c719925eb0ef0c77e3ec0d1259247a12 to your computer and use it in GitHub Desktop.
Save kuy/c719925eb0ef0c77e3ec0d1259247a12 to your computer and use it in GitHub Desktop.
render((
<Router history={...}>
<Route path="/" component={App}>
<Route path="A" component={PageA} onEnter={/* E-A */} onLeave={/* L-A */} />
<Route path="B" component={PageB} onEnter={/* E-B */} onLeave={/* L-B */} />
<Route path="C" onEnter={/* E-C */} onLeave={/* L-C */} />
</Route>
</Router>
), document.getElementById('...'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment