Skip to content

Commit 907b387

Browse files
committed
naming
1 parent e10795e commit 907b387

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ const todoReducer = (state, action) => {
6868
}
6969
};
7070

71-
const useCombinedReducer = useReducers => {
71+
const useCombinedReducer = combinedReducers => {
7272
// Global State
73-
const state = Object.keys(useReducers).reduce(
74-
(acc, key) => ({ ...acc, [key]: useReducers[key][0] }),
73+
const state = Object.keys(combinedReducers).reduce(
74+
(acc, key) => ({ ...acc, [key]: combinedReducers[key][0] }),
7575
{}
7676
);
7777

7878
// Global Dispatch Function
7979
const dispatch = action =>
80-
Object.keys(useReducers)
81-
.map(key => useReducers[key][1])
80+
Object.keys(combinedReducers)
81+
.map(key => combinedReducers[key][1])
8282
.forEach(fn => fn(action));
8383

8484
return [state, dispatch];

0 commit comments

Comments
 (0)