-
Notifications
You must be signed in to change notification settings - Fork 0
Define Cart Methods #5
Copy link
Copy link
Open
Labels
Description
Return values for getCart and emptyCart are simple enough, but for addToCart, removeFromCart, updateQuantity, etc, what should we return? Do cart update methods just return success/error, or the whole cart object again? I'm tempted to return the whole cart again so that we don't have to make another trip to the server to update cart. Options:
- if we return success/err, we have to then go back to the server again to get the updated cart
- if we return the new cart object, we save this extra request. If we don't want to change Phoenix, at least the library can do the 2 calls for us and make it simpler to implement
Reactions are currently unavailable