Skip to content

Commit ff1569b

Browse files
committed
Resolve lesson 02
1 parent 4af4466 commit ff1569b

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
import React from 'react'
22
import { render } from 'react-dom'
33
import App from './modules/App'
4-
render(<App/>, document.getElementById('app'))
4+
import About from './modules/About'
5+
import Repos from './modules/Repos'
6+
import { Router, Route, hashHistory } from 'react-router'
7+
8+
render((
9+
<Router history={hashHistory}>
10+
<Route path="/" component={App} />
11+
<Route path="/about" component={About} />
12+
<Route path="/repos" component={Repos} />
13+
</Router>
14+
), document.getElementById('app'))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react'
2+
3+
export default React.createClass({
4+
render() {
5+
return <div> About me </div>
6+
}
7+
})
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react'
2+
3+
export default React.createClass({
4+
render() {
5+
return <div> Repos </div>
6+
}
7+
})

0 commit comments

Comments
 (0)