Answer the question
In order to leave comments, you need to log in
How to return a product back by changing the quantity?
There is such a wonderful example from the redux off site: CodeSandBox
By clicking on a product, its quantity becomes -1, and in the basket +1.
How to do the opposite? So that when you click on a product in the basket, it becomes -1, and in the general list +1.
Help please ✌️
Answer the question
In order to leave comments, you need to log in
Create an action:
const removeFromCart = productId => ({
type: types.REMOVE_FROM_CART,
productId
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question