Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
I am using zustand
as the main state management for the project with custom hooks and organized files.
complex states which I overcome by using zustand
and custom hooks
.
in the building stage, there is a minor error that makes my solution not appear properly.
Community feedback
- @markuslewinPosted 4 months ago
Hi!
products[0]
doesn't exist when the array is empty, so the script crashes. You probably meant to writeproducts[0]?.quantity || 0
inproductDescription.jsx
!Marked as helpful0@coder-abdoPosted 4 months ago@markuslewin here is my fault, I always use typescript to prevent such a minor mistake like that so I will try your solution, and hopefully works.
1
Please log in to post a comment
Log in with GitHubJoin 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