File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import identity from 'lodash/utility/identity';
2
2
import shallowEqual from '../utils/shallowEqual' ;
3
3
4
4
export default function createConnector ( React ) {
5
-
6
5
const { Component, PropTypes } = React ;
7
6
8
7
return class Connector extends Component {
@@ -38,8 +37,7 @@ export default function createConnector(React) {
38
37
constructor ( props , context ) {
39
38
super ( props , context ) ;
40
39
41
- this . handleChange = this . handleChange . bind ( this ) ;
42
- this . unsubscribe = context . redux . subscribe ( this . handleChange ) ;
40
+ this . unsubscribe = context . redux . subscribe ( ::this . handleChange ) ;
43
41
this . state = this . selectState ( { context, props } ) ;
44
42
}
45
43
@@ -67,12 +65,9 @@ export default function createConnector(React) {
67
65
render ( ) {
68
66
const { children } = this . props ;
69
67
const { slice } = this . state ;
70
- const { redux } = this . context ;
68
+ const { redux : { dispatch } } = this . context ;
71
69
72
- return children ( {
73
- dispatch : redux . dispatch ,
74
- ...slice
75
- } ) ;
70
+ return children ( { dispatch, ...slice } ) ;
76
71
}
77
72
} ;
78
73
}
You can’t perform that action at this time.
0 commit comments