Skip to content

Commit 66efb13

Browse files
committed
access redux instance from this.context
1 parent 4ad1002 commit 66efb13

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/createConnector.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ export default function createConnector(React) {
3838
constructor(props, context) {
3939
super(props, context);
4040

41-
this.redux = context.redux;
4241
this.state = this.selectState(props, context);
4342
}
4443

4544
componentDidMount() {
46-
this.unsubscribe = this.redux.subscribe(::this.handleChange);
45+
this.unsubscribe = this.context.redux.subscribe(::this.handleChange);
4746
}
4847

4948
componentWillReceiveProps(nextProps) {

0 commit comments

Comments
 (0)