0 points

javascript - Mapping Array in a Props - Stack Overflow


dashboard

Fri May 22 2020 13:57:15 GMT+0000 (UTC)

Posted by @tigran #javascript

import React from 'react';
import Card from './Card';

function CardList ({jobs}) {
  return (
    jobs.map((job,i) => {
      return (
        <Card
          key={i}
          id={jobs[i].id}
          name={jobs[i].name}
          langs={jobs[i].langs} 
        />
     );
  );
}

export default CardList;
content_copy Copy

https://stackoverflow.com/questions/61956643/mapping-array-in-a-props