DEV Community

Discussion on: Simple React Shopping Cart

Collapse
 
doberman7 profile image
Ivan Rubio

Hi, i'm practicing React developing a Store, for adding the feature of the Shopping Cart I use your implementation as faithful as I could .

But in my implementation, even though my version is almost the same, the "add to cart" button doesn't differentiate between each product.

This is:
1st click affect all the buttons not only the clicked one and the other buttons change to "add more"
each posterior click only adds more products of the 1st one you clicked, ignoring if you clicked another one.

here's the deploy

tienda-de-garage.herokuapp.com/

how you detect that the user clicks on another product??