Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Ecommerce gallery and cart with modal

react
Nico Velasco•410
@Darionvr
A solution to the E-commerce product page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What challenges did you encounter, and how did you overcome them?

This challenge had some tricks with the use of 'modal' because viewing images inside the modal should not change the previews that were outside. I finally solved it by creating separate states for each one to avoid double functionality.

What specific areas of your project would you like help with?

Since the 'modal' is used not only for images but also for viewing the menu on smartphones, I wasn't sure whether to create a separate modal component and if it would work correctly, so I created a modal section within each component separately to avoid malfunction and to avoid creating another UseContext file.

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 Nico Velasco'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

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