npm install
your packages. pg and sequelize-cli are already called upon.config/config.js
and change your username.npx sequelize db:create
npx sequelize db:migrate
npx sequelize db:seed:all
App
component. This is the same for all the other data we need throughout the app, such as which item is currently selected, and the array of items in the cart.App
via a prop function to add that item to the cart
array stored in app state. We format the data (to add quantity) in the prop function before modifying cart
.itemDetail
: https://github.com/rocketacademy/react-ecom-bootcamp/blob/main/src/components/ItemDetail.jsx#L14-L16item
into the cart
array: https://github.com/rocketacademy/react-ecom-bootcamp/blob/main/src/App.jsx#L13-L15cart
array sets off the rendering of the Cart
component and items in the cart.