Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Product list with cart

react, redux
Abel Muro•1,920
@AbelMuro
A solution to the Product list with cart challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am most proud of refactoring my code in such a way that I was able to prevent any unnecessary re-renders in the app. Updating the global state in redux was causing a lot of re-renders that I wasn't aware of. But I took the time to refactor, and now the app is fully optimized.

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

The biggest challenge was preventing the unnecessary re-renders in the app. Alot of my components were subscribed to the global store, and because of this, these components were rendered at least 4 or 5 times when they should've been rendered at least once. I memoized most of my components to solve this issue, and I did a bit of refactoring as well

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

The area I would like help with is finding different ways to prevent unnecessary renders in my react app. I tried my very best to optimize the app by memoizing and refactoring, but if you think there is a better way to do this, please let me know.

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 Abel Muro'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
  • Use cases

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