basir / node-react-ecommerce

Build ECommerce Website Like Amazon By React & Node & MongoDB
https://node-react-ecommerce-app.herokuapp.com/
1.69k stars 793 forks source link

Cart quantity reduce method concatenates #156

Closed Dennis-The14th-web closed 2 years ago

Dennis-The14th-web commented 2 years ago

The cart-quantity concatenates prev, curr, and initial values instead or summing and returning the total.

Dennis-The14th-web commented 2 years ago

I set the qty from redux actions before dispatch as a Number data type. The hooks make it return the qty as a string which, with the reduce method, it concatenates. Dispatch qty:qty. Thanks for this wonderful information the upload component for me is highly conceptual. Thank you, sir.

Dennis-The14th-web commented 2 years ago
Screen Shot 2022-10-15 at 2 41 34 AM