index.js 662 B

1234567891011121314151617181920
  1. import React from 'react'
  2. import { render } from 'react-dom'
  3. import { Router, Route, browserHistory, IndexRoute } from 'react-router'
  4. import App from './modules/App'
  5. import About from './modules/About'
  6. import Repos from './modules/Repos'
  7. import Repo from './modules/Repo'
  8. import Home from './modules/Home'
  9. render((
  10. <Router history={browserHistory}>
  11. <Route path="/" component={App}>
  12. <IndexRoute component={Home}/>
  13. <Route path="/repos" component={Repos}>
  14. <Route path="/repos/:userName/:repoName" component={Repo}/>
  15. </Route>
  16. <Route path="/about" component={About}/>
  17. </Route>
  18. </Router>
  19. ), document.getElementById('app'))