Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit 067c337

Browse files
author
Hudson Prestidge
committed
complete lesson 8
1 parent 4565f66 commit 067c337

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

lessons/08-index-routes/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
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}/>
14+
1215
<Route path="/repos" component={Repos}>
1316
<Route path="/repos/:userName/:repoName" component={Repo}/>
1417
</Route>

lessons/08-index-routes/modules/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import NavLink from './NavLink'
3+
import Home from './Home'
34

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

0 commit comments

Comments
 (0)