Skip to content

Commit a085177

Browse files
committed
Lesson 08 Final
1 parent ee1ee53 commit a085177

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import React from 'react'
22
import { render } from 'react-dom'
3-
import { Router, Route, hashHistory } from 'react-router'
3+
import { Router, Route, hashHistory, IndexRoute } from 'react-router'
44
import App from './modules/App'
55
import About from './modules/About'
66
import Repos from './modules/Repos'
77
import Repo from './modules/Repo'
8+
import Home from './modules/Home'
89

910
render((
1011
<Router history={hashHistory}>
1112
<Route path="/" component={App}>
13+
<IndexRoute component={Home}/>
1214
<Route path="/repos" component={Repos}>
1315
<Route path="/repos/:userName/:repoName" component={Repo}/>
1416
</Route>

modules/Home.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react'
2+
3+
export default React.createClass({
4+
render() {
5+
return <div>Home</div>
6+
}
7+
})
8+

0 commit comments

Comments
 (0)