Displaying lists in React
Most web applications we see around today use list components in describing a user interface. In any complex web application project or production-grade application, you will see the list feature, often used in data presentation. In React, you can use a list to display your component data.
We are going to use mocked data to showcase how you can use map()
to fetch a list of data items. We will also discuss the essence of the key
and id
attributes in React list management. The GitHub repository for this book’s project (https://github.com/PacktPublishing/Full-Stack-Flask-Web-Development-with-React/tree/main/Chapter-05/06/frontend) contains the mocked conference speakers data
source; you can find images
in the public folders and css
(index.css
) inside the src
folder.
However, the backend section of this book (Chapter 9, API Development and Documentation) will explain how we can pull this data from an API endpoint developed in Flask.
This url
leads...