Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
This particular challenge really helped me master the use of Tailwind classes for implementing responsive designs. I used react hooks to manage/store the state of the shopping cart at any point in time. I am very happy with the learnings from this challenge.
If I had to do this again, I will add pagination to the application.
What challenges did you encounter, and how did you overcome them?There were quite a few challenges in this particular project. Some of them are listed below.
- Keeping count of the products in cart was the first big challenge. I did that by using a state named cart which is basically an array of JSON objects. Each object in the array has product details and a counter for the number of items in the cart for that particular product.
- In order to implement some of the hover functionality for the SVGs in the design, I had to learn about the fill in SVGs and that was something I have not worked with before. It was a nice quick thing to learn.
- The confirm order button brings up a modal which was an interesting challenge to implement.
I would like to discuss different ideas regarding the cart state management. What is the recommended way of doing that in a library like React and why.
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord