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)
Смотрите видео Ecommerce App With React Hooks & Firebase #9 Cart Price & Quantity онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь JS Solutions 01 Январь 1970, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,052 раз и оно понравилось 25 людям.