Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.