scrimba
React Bootcamp Course
Add Image to Cart
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Add Image to Cart
AboutCommentsNotes
Add Image to Cart
Expand for more info
z_challenge.md
run
preview
console
# Challenge

Setup context to manage items in an array called `cartItems`. This will be an array of image objects.

1. Add the `cartItems` state to context. (Array)
2. Add function to add an image to the cart. (Takes the full image object as parameter)
3. Make it so clicking the plus icon on the image adds the item to the cart. (Console.log the cart items array to see that it's working)
Console
/
-3:17