A stateful grocery store app built with Redux & React
🎬 Watch the demo video at frankie.engineer/more
- 🍍 View grocery inventory
- 🛒 Add items to cart
- ➕ Update quantity of an item in cart
- 💸 Purchase all items in the cart
Redux Store
produce
list of purchasable items, searchable by idcart
items currently in the cart, each with an id & quantity
React Components
Cart
user's itemsProduceList
array of produce itemsProduceDetails
one produce item
React Hooks
useEffect
used for- on app load, dispatch
populateProduce
action to add all produce to the Redux store - show
Cart
sidebar whenevercart
state changes (e.g. user adds an item)
- on app load, dispatch
useSelector
used for- in the
ProduceList
component to get theproduce
slice of state
- in the
npm install
npm start