This repository was archived by the owner on Jul 19, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +38
-2
lines changed Expand file tree Collapse file tree 4 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
22import { render } from 'react-dom'
33import App from './modules/App'
4- render ( < App /> , document . getElementById ( 'app' ) )
4+ import { Router , Route , hashHistory } from 'react-router'
5+ import About from './modules/About'
6+ import Repos from './modules/Repos'
7+
8+
9+ render ( (
10+ < Router history = { hashHistory } >
11+ < Route path = "/" component = { App } >
12+ < Route path = "/repos" component = { Repos } />
13+ < Route path = "/about" component = { About } />
14+ </ Route >
15+ </ Router >
16+ ) , document . getElementById ( 'app' ) )
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+ } )
Original file line number Diff line number Diff line change 11import React from 'react'
2+ import { Link } from 'react-router' ;
23
34export default React . createClass ( {
45 render ( ) {
5- return < div > Hello, React Router!</ div >
6+ return (
7+ < div >
8+ < h1 > Ghetto hub issues</ h1 >
9+ < ul role = "nav" >
10+ < li > < Link to = '/about' activeStyle = { { color :'#c9ce06' } } > About</ Link > </ li >
11+ < li > < Link to = '/repos' activeStyle = { { color :'chartreuse' } } > Repos</ Link > </ li >
12+ </ ul >
13+ { this . props . children }
14+ </ div >
15+ )
616 }
717} )
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+ } )
You can’t perform that action at this time.
0 commit comments