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
  • 27,861
  • 6
  • 44
  • 69

0 Answers0