Answers for "loop with react and react native"

15

loop inside react js

<div>
  {items.map((item,index) => <ObjectRow key={index} name={item} />)} 
</div>
Posted by: Guest on July-27-2021
0

react loop

{data.map(x => {
  return (
    <div>
      <p>{content}</p>
    </div>
  )
})}
Posted by: Guest on August-06-2021
-1

loop with react and react native

import React from 'react';
import './App.css';


let items=['Item 1','Item 2','Item 3','Item 4','Item 5'];
let itemList=[];
items.forEach((item,index)=>{
  itemList.push( <li key={index}>{item}</li>)
})
function App() {
  
  return (
    <>
   
      <h2>This is a simple list of items</h2>
      <ul>
        {itemList}
      </ul>
    </>
  );
}

export default App;
Posted by: Guest on May-29-2021

Code answers related to "loop with react and react native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language