// ... prev. code ommited export const combineReducer = reducers => { // ... prev. code ommited const reducerFunction = (state, action) => { // ... prev. code ommited // finally, return the updatedStateByReducers if its not equal to the prevState return hasStateChanged ? updatedStateByReducers : state; }; };