Grace-Shopper-E / grace-shopper

https://grace-shopper-e.onrender.com/
MIT License
0 stars 2 forks source link

1.4 Create a thunk, and reducer case so that AllProducts is able to use data from the database #9

Open Lauren-Baca opened 1 year ago

Lauren-Baca commented 1 year ago

Essential for #5

siyunfeng commented 1 year ago

Do we only work on fetch all products data? I can't think of other scenarios for using this thunk and reducer.

christine-zheng commented 1 year ago

Tier One: All Products component ✓ renders the products passed in as props (66ms) ✓ renders DIFFERENT products passed in as props ✓ renders "Products Coming Soon!" if passed an empty array of products Redux set/fetch products ✓ _setProducts action creator returns a valid action ✓ fetchProducts thunk creator returns a thunk that GETs /api/products reducer ✓ returns the initial state by default ✓ reduces on SET_PRODUCTS action

7 passing (154ms)