aboutsummaryrefslogtreecommitdiff
path: root/src/reducers/index.js
blob: 3ebe4919b397dc3b5c505f84e15b856086cc0421 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import inputReducer from 'reducers/input';
import settingReducer from 'reducers/setting';
import followReducer from 'reducers/follow';

const defaultState = {
  input: inputReducer(undefined, {}),
  setting: settingReducer(undefined, {}),
  follow: followReducer(undefined, {}),
};

export default function reducer(state = defaultState, action = {}) {
  return Object.assign({}, state, {
    input: inputReducer(state.input, action),
    setting: settingReducer(state.setting, action),
    follow: followReducer(state.follow, action),
  });
}