---
title: "Discussion on \"Use the map() function in React to display items in DOM\" | Hashnode"
description: "Discussion on \"Use the map() function in React to display items in DOM\". We have an array of objects called cats. We want to display the cats' names as an unordered list in the DOM.\nimport React from \"react\";\n\nfunction App() {\n  const cats = [\n    { name: \"Nanny\" },\n    { name: \"Minki\" },\n    { name: \"Bread\" },\n    { name..."
url: "https://hashnode.com/posts/use-the-map-function-in-react-to-display-items-in-dom/62a9a3acb108fb160fbaf744"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Use the map() function in React to display items in DOM](https://lizeduplessis.hashnode.dev/use-the-map-function-in-react-to-display-items-in-dom?utm_source=hashnode&utm_medium=feed)

We have an array of objects called cats. We want to display the cats' names as an unordered list in the DOM. import React from "react"; function App() { const cats = \[ { name: "Nanny" }, { name: "Minki" }, { name: "Bread" }, { name...

Jun 15, 2022 · 1 min read · lizeduplessis.hashnode.dev  
Read the article

-   [#map](https://hashnode.com/tag/map)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#dom](https://hashnode.com/tag/dom)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Lize du Plessis](https://hashnode.com/@Lize)

@Lize · Birmingham,United Kingdom

  
[View profile](https://hashnode.com/@Lize)

Learning how to code

South-African who left a job teaching to learn how to code!

## Responses 2

Markdown supported · ⌘↵ to post

[Daniel Brobäck](https://hashnode.com/@DanneBrob)

[Jun 19, 2022](https://hashnode.com/posts/use-the-map-function-in-react-to-display-items-in-dom/62a9a3acb108fb160fbaf744/comment/62af562bd8afe74aa51fd751)

Great short post, I like it a lot!

[Developer Avocado](https://hashnode.com/@AvocaDEV)

[Jun 15, 2022](https://hashnode.com/posts/use-the-map-function-in-react-to-display-items-in-dom/62a9a3acb108fb160fbaf744/comment/62aa001e2b2b09182b653b7d)

Thanks for article [Lize du Plessis](https://hashnode.com/@Lize), informative as always 👍
