Skip to content

es-sayers/product_list_with_cart

Repository files navigation

Frontend Mentor - Product list with cart solution

This is a solution to the Product list with cart challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

Users should be able to:

  • Add items to the cart and remove them
  • Increase/decrease the number of items in the cart
  • See an order confirmation modal when they click "Confirm Order"
  • Reset their selections when they click "Start New Order"
  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page

Screenshot

Desktop Version Cart Desktop Version Confirmation Mobile Version Cart Mobile Version Confirmation

Links

My process

I used NextJS with a mobile first approach. First thing was breaking down the page into components, then I focused on layout and responsiveness to start before moving on to styling.

Built with

  • Tailwind
  • Mobile-first workflow
  • React - JS library
  • Next.js - React framework

What I learned

This project taught me a lot about TypeScript and React. I learned how to better approach components, use contexts, create custom types, and improved my CSS.

Continued development

I want to continue to learn how to create scalable applications with React. Contexts made this project so much easier so I want to improve my usage of them.

CSS is always something that I want to continue to practice so I avoid adding useless styles and can make my components as simple as possible.

Useful resources

  • Tailwind - They have great docs and it makes it very easy to pick up.

Author