Playback starts YouTube’s embedded player (privacy-enhanced mode).
How to implement cart in pure React? (useReducer and useContext hooks)
ChannelArtur ChmaroChapters
Description from the creator
In this video, you will learn how to read and write state from the #Context API. I will use #React #Hooks for that.
CODE: codesandbox.io/s/vibrant-wind-5gdt2
0:00:00 - Intro
0:02:30 - Context Provider
0:07:00 - reducer implementation
0:10:00 - read state from Context
0:13:00 - "ADD" action
0:15:00 - dispatch actions from components
0:18:00 - remove item from Cart
0:23:00 - calculate total price with reduce()
Blog: fullstak.pl/
Instagram: instagram.com/fullstak_pl/
Discord: discord.gg/Ft9nb4C
Twitter: twitter.com/ArtiChmaro
CODE: codesandbox.io/s/vibrant-wind-5gdt2
0:00:00 - Intro
0:02:30 - Context Provider
0:07:00 - reducer implementation
0:10:00 - read state from Context
0:13:00 - "ADD" action
0:15:00 - dispatch actions from components
0:18:00 - remove item from Cart
0:23:00 - calculate total price with reduce()
Blog: fullstak.pl/
Instagram: instagram.com/fullstak_pl/
Discord: discord.gg/Ft9nb4C
Twitter: twitter.com/ArtiChmaro
About this tutorial
Artur Chmaro published this 25:23 video tutorial on October 30, 2020. It has been watched 8,755 times on YouTube.
- Channel
- Artur Chmaro
- Category
- Science & Technology
- Duration
- 25:23
- Published
- October 30, 2020
- Views
- 8,755
- Likes
- 203
Tags
Share
This tutorial in other languages
- FRComment mettre en œuvre panier dans le plus pur React? (Crochets useReducer et useContext)
- ESCómo implementar la compra en el más puro reaccionar? (UseReducer y useContext ganchos)
- PTComo implementar carrinho em puro reagir? (UseReducer e useContext ganchos)
- ITCome implementare carrello in puro Reagire? (UseReducer e useContext ganci)
- DEWie Warenkorb zur Umsetzung in reinen reagieren? (UseReducer und useContext Haken)
- NLHoe te implementeren kar in pure reageren? (UseReducer en useContext haken)
- RUКак реализовать телегу в чистом Реагировать? (UseReducer и useContext крючки)
- PLJak wdrożyć koszyk w czystej zareagować? (UseReducer i useContext haki)
- JAリアクト純粋にカートを実装する方法? (useReducerとuseContextフック)
- ARكيفية تنفيذ العربة في نقية رد فعل؟ (useReducer وuseContext السنانير)
- HIकैसे गाड़ी को लागू करने के शुद्ध प्रतिक्रिया में? (UseReducer और useContext हुक)
- IDBagaimana menerapkan keranjang dalam murni Bereaksi? (UseReducer dan useContext kait)