mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-09-23 10:21:11 +00:00
Contain Redux to one file
Move rootReducer into boot.js Change-Id: Ia086fef2bd446b900d6b06e58ca9c998c2729a03
This commit is contained in:
parent
f9cc341105
commit
3d43263070
|
@ -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,
|
||||
|
|
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in a new issue