Hi all in this video we will calculate and display our cart overall quantity and price. We can do this by separating these properties values in a new array from our cartProducts which is an array of objects. After separating these values we can use reduce method to calculate the sum of these values.
Note: I made a change in my project, now we will display the no of documents in firestore at the top of cart icon as an indicator which is different from overall quantity of cart.
Course Files: https://github.com/HamzaAnwar1998/eco...
(Switch to lesson_9 for this video code)
Watch video Ecommerce App With React Hooks & Firebase #9 Cart Price & Quantity online without registration, duration hours minute second in high quality. This video was added by user JS Solutions 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,052 once and liked it 25 people.