This repository has been archived on 2020-04-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Vim-Vixen/src/content/reducers/index.js
2017-11-11 16:16:01 +09:00

24 lines
868 B
JavaScript

import addonReducer from './addon';
import findReducer from './find';
import settingReducer from './setting';
import inputReducer from './input';
import followControllerReducer from './follow-controller';
// Make setting reducer instead of re-use
const defaultState = {
addon: addonReducer(undefined, {}),
find: findReducer(undefined, {}),
setting: settingReducer(undefined, {}),
input: inputReducer(undefined, {}),
followController: followControllerReducer(undefined, {}),
};
export default function reducer(state = defaultState, action = {}) {
return Object.assign({}, state, {
addon: addonReducer(state.addon, action),
find: findReducer(state.find, action),
setting: settingReducer(state.setting, action),
input: inputReducer(state.input, action),
followController: followControllerReducer(state.followController, action),
});
}