index.js 573 B

123456789101112131415161718
  1. import React from 'react'
  2. import { render } from 'react-dom'
  3. import { Router, Route, hashHistory } 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. render((
  9. <Router history={hashHistory}>
  10. <Route path="/" component={App}>
  11. <Route path="/repos" component={Repos}>
  12. <Route path="/repos/:userName/:repoName" component={Repo}/>
  13. </Route>
  14. <Route path="/about" component={About}/>
  15. </Route>
  16. </Router>
  17. ), document.getElementById('app'))