Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Responsive Desserts Shop with React + Tailwind + Vite

react, tailwind-css, vite
Naveer Riaz•70
@NaveerRiaz
A solution to the Product list with cart challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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.

  1. 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.
  2. 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.
  3. The confirm order button brings up a modal which was an interesting challenge to implement.
What specific areas of your project would you like help with?

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.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Naveer Riaz's solution.

Join 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License