File tree 2 files changed +2
-9
lines changed
2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import { push } from 'react-router-redux'
3
2
import { bindActionCreators } from 'redux'
4
3
import { connect } from 'react-redux'
5
4
import {
@@ -24,7 +23,6 @@ const Home = props => (
24
23
< button onClick = { props . decrementAsync } disabled = { props . isDecrementing } > Decrement Async</ button >
25
24
</ p >
26
25
27
- < p > < button onClick = { ( ) => props . changePage ( ) } > Go to about page via redux</ button > </ p >
28
26
</ div >
29
27
)
30
28
@@ -38,10 +36,7 @@ const mapDispatchToProps = dispatch => bindActionCreators({
38
36
increment,
39
37
incrementAsync,
40
38
decrement,
41
- decrementAsync,
42
- changePage : ( ) => {
43
- dispatch ( push ( '/about-us' ) )
44
- }
39
+ decrementAsync
45
40
} , dispatch )
46
41
47
42
export default connect (
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ import React from 'react'
2
2
import { render } from 'react-dom'
3
3
import { Provider } from 'react-redux'
4
4
import { Router , Route } from 'react-router'
5
- import createHistory from 'history/createBrowserHistory'
6
- import store from './store'
5
+ import store , { history } from './store'
7
6
import App from './containers/app'
8
7
import Home from './containers/home'
9
8
import About from './containers/about'
@@ -12,7 +11,6 @@ import 'sanitize.css/sanitize.css'
12
11
import './index.css'
13
12
14
13
const target = document . querySelector ( '#root' )
15
- const history = createHistory ( )
16
14
17
15
render (
18
16
< Provider store = { store } >
You can’t perform that action at this time.
0 commit comments