0
 const List = ({people}) => {
    return (
     <>
     {people.map(person =>{
       const {id,name,age,image} = person;
        return (
          <article key={id} className='person'>
            <img src={image} alt={name} />
            <div>
              <h4>{name}</h4>
              <p>{age} years</p>
            </div>
          </article>
        );
      })}
    </>
    );
  };
Yousaf
  • 25,372
  • 4
  • 33
  • 58

0 Answers0