Reputation: 21
We're building a store in React and I'm running into issues with removing items from the cart.
Example: if we add product "foobar" to the cart multiple times, they will all be references to the original "foobar" product.
For reasons too long to explain, we don't want to keep track of quantities, so I need unique identifiers per cart item (not per product) so I can remove them easily from the cart.
I was thinking of using the Unix timestamp as identifier, but I feel there must be a cleaner solution.
Upvotes: 1
Views: 522