0
const onQtyChange = (e) => {
  CartItems.map((item) => {
    if (item.id === e.target.id) {
      updateDoc(docRefUser, {
        cart: arrayUnion({
          ...item,
          qty: e.target.value
        }),
      });
    }
  });
};

my code add a new element to my firebase/firestore,but what i need is to modify my qty in a specific object of the array. Blockquote

Dharmaraj
  • 29,469
  • 5
  • 26
  • 55

0 Answers0