DEV Community

Muhammad Awais
Muhammad Awais

Posted on

iterate the data in list using reactjs

let's suppose you have an array of objects contains the data.

javascript es6 onwards have .map() method that actually works like magic for you to iterate, filter and much more to do. so

 data.map((item, index) => {
   return (
     <p key={index}>{item.name}</p>
   );
})

Enter fullscreen mode Exit fullscreen mode

Top comments (0)