Last active
October 13, 2018 05:51
-
-
Save clucasalcantara/5fdacc756ee31802b26e439be60ae32b to your computer and use it in GitHub Desktop.
Cart Add Product action creator
This file contains hidden or 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
/** | |
* Product Example | |
* | |
* const product = { | |
* id: 'adsa-1234ds-123s', | |
* name: 'Batman Mask', | |
* price: 8.97, | |
* } | |
*/ | |
function addProductToCart(product) { | |
return { | |
type : "CART/ADD_PRODUCT", | |
product | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment