File tree Expand file tree Collapse file tree 5 files changed +119
-141
lines changed Expand file tree Collapse file tree 5 files changed +119
-141
lines changed Original file line number Diff line number Diff line change 66 "react-scripts" : " 1.0.0"
77 },
88 "dependencies" : {
9- "react" : " ^15.4.2 " ,
10- "react-dom" : " ^15.4.2 " ,
11- "react-redux" : " ^5.0.3 " ,
12- "react-router" : " ^4.0.0 " ,
13- "react-router-dom" : " ^4.0.0 " ,
9+ "react" : " ^15.5.4 " ,
10+ "react-dom" : " ^15.5.4 " ,
11+ "react-redux" : " ^5.0.5 " ,
12+ "react-router" : " ^4.1.1 " ,
13+ "react-router-dom" : " ^4.1.1 " ,
1414 "react-router-redux" : " next" ,
1515 "redux" : " ^3.6.0" ,
1616 "redux-thunk" : " ^2.2.0" ,
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { Link } from 'react-router-dom'
2+ import { Route , Link } from 'react-router-dom'
3+ import Home from '../home'
4+ import About from '../about'
35
46const App = ( { children } ) => (
57 < div >
@@ -9,7 +11,8 @@ const App = ({ children }) => (
911 </ header >
1012
1113 < main >
12- { children }
14+ < Route exact path = "/" component = { Home } />
15+ < Route exact path = "/about-us" component = { About } />
1316 </ main >
1417 </ div >
1518)
Original file line number Diff line number Diff line change @@ -39,9 +39,7 @@ const mapDispatchToProps = dispatch => bindActionCreators({
3939 incrementAsync,
4040 decrement,
4141 decrementAsync,
42- changePage : ( ) => {
43- dispatch ( push ( '/about-us' ) )
44- }
42+ changePage : ( ) => push ( '/about-us' )
4543} , dispatch )
4644
4745export default connect (
Original file line number Diff line number Diff line change 11import React from 'react'
22import { render } from 'react-dom'
33import { Provider } from 'react-redux'
4- import { Route } from 'react-router'
54import { ConnectedRouter } from 'react-router-redux'
65import store , { history } from './store'
76import App from './containers/app'
8- import Home from './containers/home'
9- import About from './containers/about'
107
118import 'sanitize.css/sanitize.css'
129import './index.css'
@@ -16,10 +13,9 @@ const target = document.querySelector('#root')
1613render (
1714 < Provider store = { store } >
1815 < ConnectedRouter history = { history } >
19- < App >
20- < Route exact path = "/" component = { Home } />
21- < Route exact path = "/about-us" component = { About } />
22- </ App >
16+ < div >
17+ < App />
18+ </ div >
2319 </ ConnectedRouter >
2420 </ Provider > ,
2521 target
You can’t perform that action at this time.
0 commit comments