score:2

Accepted answer

you are not returning anything from the the function given to map in the render method of your component. add the return keyword and it will work as expected.

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

Related Query

More Query from same tag