Created
September 4, 2016 03:11
-
-
Save t3h2mas/e1728b3431042df49782b47e0d1e1d8d to your computer and use it in GitHub Desktop.
immutable(silly)
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
return Object.assign( | |
{}, | |
state, | |
{ | |
recipes: [ | |
...state.recipes, | |
{ | |
name: action.name, | |
action: action.ingredients, | |
id: state.recipes.length | |
} | |
] | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment