// ... prev. code ommited export const combineReducer = (reducers) => { const globalState = {}; for (const [key, value] of Object.entries(reducers)) { // check it its a reducer if (typeof value === 'function') { globalState[key] = value(undefined, { type: '__@@PLACEHOLDER_ACTION__' }); } else { // let the developer know the value is not a reducer console.error(`${value} is not a function`); } } }