Skip to content

LuckyChimp/react-product-page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - E-commerce product page solution

This is a solution to the E-commerce product page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Open a lightbox gallery by clicking on the large product image
  • Switch the large product image by clicking on the small thumbnail images
  • Add items to the cart
  • View the cart and remove items from it

Screenshots

Desktop

Desktop

Desktop with hovering the avatar

Desktop with hovering the avatar

Desktop with opened lightbox

Desktop with opened lightbox

Desktop with cart popup

Desktop with cart popup

Desktop with filled cart popup

Desktop with filled cart popup

Tablet with filled cart popup

Tablet with filled cart popup

Mobile

Mobile

Mobile with opened sidebar

Mobile with opened sidebar

Mobile with cart popup

Mobile with cart popup

Mobile with filled cart popup

Mobile with filled cart popup

Link

My process

Built with

  • Semantic HTML5 markup
  • SCSS for clean, easy and less CSS
  • Flexbox
  • React - JS library
  • Hammer.js for touch gestures for product image preview movement on touch devices

What I learned

I have learned to import SVG files as ReactComponents to make them easier to use in the project. I also found out how to use reacts useCallback function to avoid too many unnecessary rerenders and optimize rendering performance.

Useful resources

  • Hammer.js - It's the first time I worked with this library. Hammer.js is very very simple and intuitive to work with.

Author