Activity: Creating a Cart Item Component

Scenario

We want to make the CartList component a dynamic component, so that it can adapt its content to received data.

Aim

The aim of this activity is to compose React components and pass data between them.

Steps for Completion

  1. Create a CartItem component showing the name of an item.
  2. Change the previously created CartList component so that it is dynamically composed of CartItem instances, based on an items array.

Solution

A possible solution is the one contained in the my-cart-03 folder at Code/Chapter-2.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.108.212