Skip to content

Instantly share code, notes, and snippets.

@YounglanHong
Created October 12, 2020 19:09
Show Gist options
  • Save YounglanHong/79197f9762cf376e511232c5055b34c2 to your computer and use it in GitHub Desktop.
Save YounglanHong/79197f9762cf376e511232c5055b34c2 to your computer and use it in GitHub Desktop.
import { ADD_CARD, SHOW_CARD } from "../actions/cardActions.js";
const reducer = (state = initialState, action) => {
switch (action.type) {
case SHOW_CARD:
return Object.assign({}, state, { cards: action.cards });
// ...
}
};
export default reducer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment