Mapping a Array Data in React
Jun 27, 2022
Hi Guys, Today we are going to learn about how to map the data in React Application
Here we have defined our array
const data =[“React”,”React-Native”,”Java”,”HTML”,”CSS”];
To Map the value in React
<div>
{data && data.map((item,index)=>(
<div>
<h3 key={index}>{item}</h3>
</div>
))}
</div>
To add the value in array
data.push(“Spring boot”);//It will add the new elements in the array