scrimba
React Bootcamp Course
Indicate When Image is Already in 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

To see this lesson you need to be logged in. Joining Scrimba is free and gives you access to 20+ courses.Sign up
Indicate When Image is Already in Cart
AboutCommentsNotes
Indicate When Image is Already in Cart
Expand for more info
z_challenge.md
run
preview
console
# Challenge

Change the plus icon to a full shopping cart icon when an image is already in the cart. This should display whether the image is being hovered or not (like the favorite icon).

Icon to use when item already in cart:
<i className="ri-shopping-cart-fill cart"></i>

Hints:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some
https://stackoverflow.com/a/8217584
Console
/
-5:58