Last active
December 1, 2017 15:55
-
-
Save sfrdmn/ac382e8a44f5ca97c29fa080139c581b to your computer and use it in GitHub Desktop.
mcr_post_02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const reducer = (state, { type, payload }) => { | |
switch (type) { | |
case 'ADD_FOOD_ITEM': | |
return { | |
foodItems: [ | |
...state.foodItems, | |
payload | |
] | |
} | |
default: | |
return state; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment