Challenge: Shopping Cart

Hands-on exercise to test your knowledge about the useContext hook in React.

Task

Create a React application that utilizes the useContext and useState hook for managing a shopping cart. The application will have a product list, and users can add items to their shopping cart. We'll use a context to manage the state of the shopping cart.

Expected output

The application features a product list, allowing users to seamlessly add items to their shopping cart. The state of the shopping cart is effectively handled through the utilization of a React useContext and useState hooks.

Get hands-on with 1200+ tech skills courses.