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.
import React from "react";
function App() {
const cats = [
{ name: "Nanny" },
{ name: "Minki" },
{ name: "Bread" },
{ name...
lizeduplessis.hashnode.dev1 min read
Daniel Brobäck
Javascript and React
Great short post, I like it a lot!