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

120
Views
Ordering mapped data after connecting to a websocket with React

I have an array of ids relating to objects saved in the database.

<TableBody>
    {
        ids.map((id, i) => (
            <CustomSocketRow
            key={i}
            id={id}/>
        ))
    }
</TableBody>

I am currently mapping each id to a websocket, where data is fetched on connecting, and data is updated in real-time if changed elsewhere on the site. The problem I have is that, because I am only mapping the Ids I am unable to sort the data within the table, which is essential.

I need to sort by a date field in one of the columns which can be thought of as the internal state of one of the rows. I need to somehow wait until all of the rows are populated with data, and then sort the rows.

I think that this is an issue with the architecture of the components, more than a syntactical problem, but I don't know the best approach.

about 4 years ago · Santiago Gelvez
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!