score:4

Accepted answer

you need something like this:

tablegenerator = () => {
  return (
    <table>
      <tr>
        {columns.map(column => <th>{column.data}</th>)}
      </tr>
    </table>
  );
}

where column.data is the info you want to display (i used data as a general value but it could be label, name, info, etc).


Related Query

More Query from same tag