import { combineReducers } from "redux"; | |
const productsReducer = (state = [], action) => { | |
switch (action.type) { | |
case "REQUEST_PRODUCTS": | |
return state; | |
case "RECEIVE_PRODUCTS": | |
return action.products; | |
default: | |
return state; | |
} | |
}; | |
export default productsReducer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment