Angular - Product list with cart

Solution retrospective
I learned a lot creating and using services alongside signals to create the dynamic cart updating in all of my components.
What challenges did you encounter, and how did you overcome them?I started using signals and i ran into an issue of my cart not updating despite receiving the right information. I learned that signals don't update by setting new values like with Js variables, instead i had to use .set and .update on all of my functions to actually update my signals. After i got that, it was smooth sailing.
What specific areas of your project would you like help with?I would like to know if there is a better way to avoid prop drilling in my project, i thought i did a good job but there was 1 component where i needed 3 inputs to get information down to the child. It was the add to cart button that also needed to track which product it belonged to and also count that product amount and display it. It works but i would like to know if there is a way to avoid the (product-list > product-card > add-to-cart-button) prop drilling.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on esteban-eyeride’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