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.
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
- Solution URL: https://react-product-page-nine.vercel.app/
- 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
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.
- Hammer.js - It's the first time I worked with this library. Hammer.js is very very simple and intuitive to work with.
- Frontend Mentor - @LuckyChimp