Hi i was asking if it is a vaild pattren write a reusable reducer this way
`` const INC ='INC'
const counterReducer = (id, initialState) => (state = initialState, action) => {
if (action && action.meta.id === id) { switch (action.type) { case INC: return state+1 default: return state; } } else { return state; } };
const store = createStore(combineReducers({ c1:counterReducer("c1",0), c2:counterReducer("c2",1), c3:counterReducer("c3",2) }));
// dispatch action to first reducer// store.dispatch({type:INC,meta:{id:"c1"}});
// dispatch action to second reducer// store.dispatch({type:INC,meta:{id:"c2"}});
// dispatch action to second reducer//` store.dispatch({type:INC,meta:{id:"c3"}}); ```