React - props.children - exercise
Create a component named ShopList
. It should take an array with shopping cart elements in the props
.
Objects need to follow the format:
In a div with the shoplist
CSS class, display only ShopItemHeader
components with appropriate data. Use map()
.
Render the component on the page, passing the following items
to props:
Remember to create the main App
component as well. Render the App
component on the page.
Do this exercise with class components only.
Last updated