Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 2.25 KB

README.md

File metadata and controls

34 lines (26 loc) · 2.25 KB

Shopping Cart

https://fmcshoppingcart.netlify.app/

Project Summary:

This is a mock shopping page as part of the TOP curriculum with an emphasis on the shopping cart aspect. The main focus is client sided routing of the shopping cart and practicing previousy learned React concepts.

Goals:

  • Use React Router for client side routing
  • Practice test driven development with vitest
  • Get familiar with css modules
  • Fetch fake store data
  • Create add-to-cart functionality and quantity adjustments
  • Use conditional rendering for dynamic pages

Fetching Data

Retreiving data and rendering on page. Users can add desired items to their cart with a quantity of up to 9 items.

Screenshot 2024-07-17 at 8 31 14 AM

Cart Functionality

Items are stored in a cart (utilizing useState).

Screenshot 2024-07-17 at 8 31 37 AM

Conditional Rendering

Conditional rendering is used throughout the project (some classes included).

Screenshot 2024-07-17 at 8 31 57 AM

Reflection:

My favorite project so far! I've enjoyed using React a lot. Learning new concepts has been a joy and I couldn't have thought of a better project to put some of the new ones I learned to the test. The most difficult area of the project was doing the tests using vitest. I'm sure my tests aren't perfect but I'm glad to be getting familiar with it at the very least. I used outlets in this project alongside React Router so it made for a really easy experience. No project is completed without difficulty and errors along the way, and I can assure you I had some here and there. What I gained from this project was just to simply stick with it. Whether it's asking for help or googling, there's always an option to progress. Grit is the key.

Credits: