Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

shopping cart using React js and styled components

@Clemcy9

Desktop design screenshot for the E-commerce product page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Thank God I'm finally done after a week of coding and debugging. I still have some problems I'll like to share with this lovely community for help: #1. how to add windows listener to react components #2. How to code a responsive modal in react.

thank you in advance for your comments.

Community feedback

@karthik2265

Posted

looks good

The lightbox looks great, you should definitely put more effort into css. If you want to take your css to next level try scrimba.com, they have awesome free courses.

I found this repo to be very helpful as a resource (react), take a look https://github.com/academind/react-complete-guide-code

Overall, well done 👏

Aim for improvement, not perfection.

Thank you

1

@Clemcy9

Posted

@karthik2265 thank you very much, I'll take a look at it sir

1

@shihabmunshi06

Posted

This comment was deleted

0

@Clemcy9

Posted

@shihabmunshi06 thanks for the comment. Yes I understatnd this solution, but what I really need is adding an onclick listener generally to window object to help toggle off nav-menu and cart modal. If I choose to follow the solution you stated, I'll have to add this listener to every component individually... very stressful and I think it will make my code 'wet'

0

@shihabmunshi06

Posted

@Clemcy9 I didn't clearly understand what you wanted, you want the mobile menu to close when the user clicks/touches on the document outside nav ??

0

@Clemcy9

Posted

@shihabmunshi06 exactly

0

@shihabmunshi06

Posted

@Clemcy9 i do that with javascript, where i select all the things with != nav, whenever someone clicks outside nav, i take away the active class and the nav shrinks

0

Please log in to post a comment

Log in with GitHub
Discord logo

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