3 Ways to Render a List in React

Using inline functions, extracting the item to its own component, and more

Photo by Kelly Sikkema on Unsplash

This small post will look at slightly different ways to render a list in React.

The list stays inside the List component and displays several towns. Below is the List component called with a hardcoded array.

import List from "./List";

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store