Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

103
Vistas
How to loop to list all my users inside the component

Good I am new with react, and I have the problem of not knowing how to make a loop inside this component to list all the users I have tried a thousand and one ways but I am not getting anywhere.

 columns: [
  { Header: "companies", accessor: "companies", width: "45%", align: "left" },
  { Header: "members", accessor: "members", width: "10%", align: "left" },
  { Header: "budget", accessor: "budget", align: "center" },
  { Header: "completion", accessor: "completion", align: "center" },
],

rows: [
  {
    companies: <Company image={logoXD} name="Material UI XD Version" />,
    members: (
      <MDBox display="flex" py={1}>
        {avatars([
          [team1, "Ryan Tompson"],
          [team2, "Romina Hadid"],
          [team3, "Alexander Smith"],
          [team4, "Jessica Doe"],
        ])}
      </MDBox>
    ),
    budget: (
      <MDTypography variant="caption" color="text" fontWeight="medium">
        $14,000
      </MDTypography>
    ),
    completion: (
      <MDBox width="8rem" textAlign="left">
        <MDProgress value={60} color="info" variant="gradient" label={false} />
      </MDBox>
    ),
  },
],

Where I would like to make the loop would be in rows

Thank you very much

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can loop on an array with the map function. If you want to display the row for instance, you can do like this, in your return function:

return (
  <>
    {
      rows.map(row => row) // Display every row
    }
  </>
)

or if you want to access a specific property of each row:

rows.map(row => row.companies) // Display every companies

Take a look at some examples if you are not familiar with map

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda