Lists in React

We’ve rendered a few primitive variables in JSX and now we’ll render a list of items.

We'll cover the following

We’ll experiment with sample data at first, then we’ll apply that to fetch data from a remote API. First, let’s define the array as a variable. As before, we can define a variable outside or inside the component. The following defines it outside:

Get hands-on with 1000+ tech skills courses.