persistCombineReducers.js 724 B

123456789101112131415161718
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = persistCombineReducers;
  4. var _redux = require("redux");
  5. var _persistReducer = _interopRequireDefault(require("./persistReducer"));
  6. var _autoMergeLevel = _interopRequireDefault(require("./stateReconciler/autoMergeLevel2"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. // combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2
  9. function persistCombineReducers(config, reducers) {
  10. config.stateReconciler = config.stateReconciler === undefined ? _autoMergeLevel.default : config.stateReconciler;
  11. return (0, _persistReducer.default)(config, (0, _redux.combineReducers)(reducers));
  12. }