Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Display a List in React by Looping Over an Array of Items


    To display a list of items in react, we can map (or loop) over that list and return JSX from inside the map function:

            props.items.map(item => {
              return <p key={item.id}>{item.title}</p>

    Remember to always include a key attribute though! That lets React keep track of each list item internally, which gives you better performance, and may save you from subtle bugs