You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Return values for
getCart
andemptyCart
are simple enough, but foraddToCart
,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:The text was updated successfully, but these errors were encountered: