Permalink
Browse files

Step 9: Create '~/reducers/cardListReducer.js'.

  • Loading branch information...
embengineering committed May 22, 2016
1 parent 688e59f commit a37732ff1403ba8594ef88f1c097fdc1002fc271
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/reducers/cardListReducer.js
@@ -0,0 +1,13 @@
import * as CONST from '../constants';
import initialState from '../initialState';
const cardListReducer = (state = initialState.cardList, {type, data}) => {
switch (type) {
case CONST.DISPLAY_CARD_LIST:
return [...state, ...data];
default:
return state;
}
};
export default cardListReducer;

0 comments on commit a37732f

Please sign in to comment.