React: Building Modern User Interfaces
Exit

Lesson 8 of 13 · Hooks and data

Global state: useContext and useReducer for the cart

1 h Node.js 22 (Debian, git, npm, python3)

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.