Contain Redux to one file

Move rootReducer into boot.js

Change-Id: Ia086fef2bd446b900d6b06e58ca9c998c2729a03
This commit is contained in:
Jeff Hobson 2016-11-16 12:00:33 -05:00
parent f9cc341105
commit 3d43263070
2 changed files with 13 additions and 12 deletions

View file

@ -35,6 +35,17 @@
return Redux.bindActionCreators( mw.popups.actions, store.dispatch );
}
/**
* Root reducer for all actions
*
* @param {Object} global state before action
* @param {Object} action Redux action that modified state.
* Must have `type` property.
* @return {Object} global state after action
*/
mw.popups.reducers.rootReducer = Redux.combineReducers( mw.popups.reducers );
// FIXME: Needs doc (or at least one comment line)
mw.requestIdleCallback( function () {
var compose = Redux.compose,
store,

View file

@ -1,4 +1,4 @@
( function ( mw, $, Redux ) {
( function ( mw, $ ) {
mw.popups.reducers = {};
/**
@ -137,14 +137,4 @@
return state;
}
};
/**
* Root reducer for all actions
*
* @param {Object} global state before action
* @param {Object} action Redux action that modified state.
* Must have `type` property.
* @return {Object} global state after action
*/
mw.popups.reducers.rootReducer = Redux.combineReducers( mw.popups.reducers );
}( mediaWiki, jQuery, Redux ) );
}( mediaWiki, jQuery ) );