Skip to content

Commit 24975c8

Browse files
committed
Style tweaks
1 parent 57a980b commit 24975c8

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/components/createConnector.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import identity from 'lodash/utility/identity';
22
import shallowEqual from '../utils/shallowEqual';
33

44
export default function createConnector(React) {
5-
65
const { Component, PropTypes } = React;
76

87
return class Connector extends Component {
@@ -38,8 +37,7 @@ export default function createConnector(React) {
3837
constructor(props, context) {
3938
super(props, context);
4039

41-
this.handleChange = this.handleChange.bind(this);
42-
this.unsubscribe = context.redux.subscribe(this.handleChange);
40+
this.unsubscribe = context.redux.subscribe(::this.handleChange);
4341
this.state = this.selectState({ context, props });
4442
}
4543

@@ -67,12 +65,9 @@ export default function createConnector(React) {
6765
render() {
6866
const { children } = this.props;
6967
const { slice } = this.state;
70-
const { redux } = this.context;
68+
const { redux: { dispatch } } = this.context;
7169

72-
return children({
73-
dispatch: redux.dispatch,
74-
...slice
75-
});
70+
return children({ dispatch, ...slice });
7671
}
7772
};
7873
}

0 commit comments

Comments
 (0)