Browse Source

Lesson 08 Final

Ryan Florence 9 years ago
parent
commit
a085177f52
2 changed files with 11 additions and 1 deletions
  1. 3 1
      index.js
  2. 8 0
      modules/Home.js

+ 3 - 1
index.js

@@ -1,14 +1,16 @@
 import React from 'react'
 import React from 'react'
 import { render } from 'react-dom'
 import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
+import { Router, Route, hashHistory, IndexRoute } from 'react-router'
 import App from './modules/App'
 import App from './modules/App'
 import About from './modules/About'
 import About from './modules/About'
 import Repos from './modules/Repos'
 import Repos from './modules/Repos'
 import Repo from './modules/Repo'
 import Repo from './modules/Repo'
+import Home from './modules/Home'
 
 
 render((
 render((
   <Router history={hashHistory}>
   <Router history={hashHistory}>
     <Route path="/" component={App}>
     <Route path="/" component={App}>
+      <IndexRoute component={Home}/>
       <Route path="/repos" component={Repos}>
       <Route path="/repos" component={Repos}>
         <Route path="/repos/:userName/:repoName" component={Repo}/>
         <Route path="/repos/:userName/:repoName" component={Repo}/>
       </Route>
       </Route>

+ 8 - 0
modules/Home.js

@@ -0,0 +1,8 @@
+import React from 'react'
+
+export default React.createClass({
+  render() {
+    return <div>Home</div>
+  }
+})
+