File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
2
import { render } from 'react-dom'
3
+ import { Router , Route , hashHistory } from 'react-router'
3
4
import App from './modules/App'
4
- render ( < App /> , document . getElementById ( 'app' ) )
5
+ import About from './modules/About'
6
+ import Repos from './modules/Repos'
7
+
8
+ render ( (
9
+ < Router history = { hashHistory } >
10
+ < Route path = "/" component = { App } />
11
+ < Route path = "/repos" component = { Repos } />
12
+ < Route path = "/about" component = { About } />
13
+ </ Router >
14
+ ) , document . getElementById ( 'app' ) )
15
+
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+
3
+ export default React . createClass ( {
4
+ render ( ) {
5
+ return < div > About</ div >
6
+ }
7
+ } )
8
+
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+
3
+ export default React . createClass ( {
4
+ render ( ) {
5
+ return < div > Repos</ div >
6
+ }
7
+ } )
8
+
You can’t perform that action at this time.
0 commit comments