Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

101
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!