Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

map an array in react

//lets say we have an array of objects called data
<div className="sample">
  {data.map((item)=>{
    return(
  <div key={item.id} className="objectname">
    <p>{item.property1}</p>
    <p>{item.property2}</p>
  </div>
    );
  });
</div>
Source by # #
 
PREVIOUS NEXT
Tagged: #map #array #react
ADD COMMENT
Topic
Name
8+7 =