aboutsummaryrefslogtreecommitdiff
path: root/src/background/reducers/index.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-07-11 21:01:22 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-07-11 21:01:22 +0900
commitb69cc04856fd21d325193d56e212e4dbf07cb762 (patch)
tree78c2733528d42df45c9e42c6fcd34ae933da5fde /src/background/reducers/index.js
parent37840c2abb02948d36cdcfaab9063f3ea67fdb6b (diff)
Use combineReducers
Diffstat (limited to 'src/background/reducers/index.js')
-rw-r--r--src/background/reducers/index.js23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/background/reducers/index.js b/src/background/reducers/index.js
index 78f855c..465f927 100644
--- a/src/background/reducers/index.js
+++ b/src/background/reducers/index.js
@@ -1,17 +1,8 @@
-import settingReducer from './setting';
-import findReducer from './find';
-import tabReducer from './tab';
+import { combineReducers } from 'redux';
+import setting from './setting';
+import find from './find';
+import tab from './tab';
-// Make setting reducer instead of re-use
-const defaultState = {
- setting: settingReducer(undefined, {}),
- find: findReducer(undefined, {}),
- tab: tabReducer(undefined, {}),
-};
-
-export default function reducer(state = defaultState, action = {}) {
- return { ...state,
- setting: settingReducer(state.setting, action),
- find: findReducer(state.find, action),
- tab: tabReducer(state.tab, action), };
-}
+export default combineReducers({
+ setting, find, tab,
+});