147
rated 0 times
[
153]
[
6]
/ answers: 1 / hits: 6622
/ 4 Years ago, wed, september 23, 2020, 12:00:00
How can I display the image inside the object in React.js?
const Area = () =>{
const flags = [
{ id: 1, name: "USA", image: "./us.png" },
{ id: 2, name: "Canada", image: "./ca.png" },
];
return (
<div>
{flags.map((area) => {
return <img key={area.id} src={area.image} />;
})}
</div>
)}
More From » reactjs