Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Last active January 5, 2016 22:27
Show Gist options
  • Save ryanflorence/a5179451ffd93c8ed5b3 to your computer and use it in GitHub Desktop.
Save ryanflorence/a5179451ffd93c8ed5b3 to your computer and use it in GitHub Desktop.
// just the assignments app, when server does routing
render(<AssignmentsApp params={SERVER_PARAMS}/>, el)
// just the courses app, same AssignmentsApp when server routed
render((
<Router>
<Route path={SERVER_BASE_URL} component={CoursesApp}>
<IndexRoute component={CourseDashboardApp}>
<Route path="assignments" component={AssignmentsApp}>
</Route>
</Router>
), el)
// everything together, once everything is in react
render((
<Router>
<Route path="/" component={FullApp}>
<Route path="discussions" component={DiscussionsApp}/>
<Route path="gradebook" component={GradebookApp}/>
<Route path="course" component={CoursesApp}>
<IndexRoute component={CourseDashboardApp}>
<Route path="assignments" component={AssignmentsApp}>
</Route>
</Route>
</Router>
), el)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment