Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 707 Bytes

12-rendering-a-list-of-items.md

File metadata and controls

17 lines (12 loc) · 707 Bytes

Rendering a List of Items

You already have a <Contact> component. It renders a contact and can be called like this:

<Contact
    name="Bruce McKernan"
    address={{line1: "5 The Villas",
        town: "Stourbridge",
        county: "Devon",
        country: "England"}}
    email="[email protected]"
/>

Create a <ContactList> component. This should accept as a prop an array of contacts (mock in code for now, or use this contacts.json, and should render each one using <Contact ... />.

Think about storing the rendered components in an array, and including that in your rendered output.