When defining React components, we can use them as the children of another component by using that component as a React element. We already saw this when we included the Catalog component inside of the App component, but let's analyze this composition further.
Composing Components
Combining Components
We will now see how to combine components in order to create new, complex components:
- Open the src/ProductList.js file in the my-shop-03 folder
- Follow the text until the end of the section
Let's consider the following component:
import React from 'react';
class ProductList extends React.Component {
render() {
return <ul>
<li>
<h3>Traditional Merlot<...