Lesson 8 of 13 · Hooks and data
Global state: useContext and useReducer for the cart
Objective
Give the cooperative's shop a cart that can be used everywhere — on the catalog cards, in the header (badge), on the cart page and at checkout — with centralized and tested rules.
This lesson is part of the full course
Unlock React: Building Modern User Interfaces to read every lesson, do the exercises, access the simulations and earn your certificate.
Already enrolled? Log in.