Open mwmadsen67 opened 1 year ago
Hi Brendan, everything looks good. Only thing I would add is that in the products slice of state, it should have an imageUrl. Its not something you'll store in the database, but you'll use active storage and aws, as you'll find out with some of the later readings, and you'll have access to it in the global state.
Otherwise it looks great!
Thanks Mike! I was wondering if it is necessary for the cart_items to have price as well so that the cart can be updated or is it sufficient for only the products to have price?
you could decide to store the total price on the cart state if you'd like, up to you! It's really just a choice between doing the math on the backend and sending it up, vs doing the math on the frontend.
Sample State
```javascript...```
). This will display the state as a code block instead of a giant line of textentities
session
errors
(here or inui
)ui
(if needed)comments
inside ofposts