+ 4

Change state immutablely

I have an initial state as = {products :[ {itemName: 'good', price : 200} ,{ itemName: 'goody', price : 230} ] Cart :[ {itemName: 'good', price : 200, quantity :1} , {itemName: 'goody', price : 230, quantity 1}] } How do I increase the quantity of items in a cart using spread operator

22nd Oct 2020, 8:36 AM
tony
0 Answer