File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ import identity from 'lodash/utility/identity';
44
55export default class ReduxContainer extends Component {
66 static contextTypes = {
7- wrapActionCreator : PropTypes . func . isRequired ,
8- observeStores : PropTypes . func . isRequired
7+ redux : PropTypes . object . isRequired
98 } ;
109
1110 static propTypes = {
@@ -38,7 +37,7 @@ export default class ReduxContainer extends Component {
3837 }
3938
4039 update ( props ) {
41- this . actions = mapValues ( props . actions , this . context . wrapActionCreator ) ;
40+ this . actions = mapValues ( props . actions , this . context . redux . wrapActionCreator ) ;
4241 if ( this . unsubscribe ) {
4342 this . unsubscribe ( ) ;
4443 }
@@ -52,7 +51,7 @@ export default class ReduxContainer extends Component {
5251 }
5352
5453 this . mapState = mapState ;
55- this . unsubscribe = this . context . observeStores ( stores , this . handleChange ) ;
54+ this . unsubscribe = this . context . redux . observeStores ( stores , this . handleChange ) ;
5655 }
5756
5857 handleChange ( stateFromStores ) {
Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ import createDispatcher from './createDispatcher';
44export default function root ( DecoratedComponent ) {
55 return class ReduxRoot extends Component {
66 static childContextTypes = {
7- observeStores : PropTypes . func . isRequired ,
8- wrapActionCreator : PropTypes . func . isRequired
7+ redux : PropTypes . object . isRequired
98 } ;
109
1110 getChildContext ( ) {
11+ const { observeStores, wrapActionCreator } = this . dispatcher
1212 return {
13- observeStores : this . dispatcher . observeStores ,
14- wrapActionCreator : this . dispatcher . wrapActionCreator
13+ redux : {
14+ observeStores,
15+ wrapActionCreator
16+ }
1517 } ;
1618 }
1719
You can’t perform that action at this time.
0 commit comments