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

93
Views
React Component's performance reduce when rendering a large list using array
<div className="listCheckbox">
            {objects.map((e) => {
              return (
                <div key={e.value}>
                  <FormControlLabel control={<Checkbox />} label={e.label} />
                </div>
              );
            })}
          </div>

//css----------------------------------------------------------------------------------
.listCheckbox {
  max-height: 350px;
  overflow-y: scroll;
}


here objects are a state of type array and contain more than 250 records. how can I render this more efficiently with the same styling

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You can use pagination and limit the records instead of showing it all. And when you try to render more you can just add it to the previous state, This way you won't lose your previous fetched records and it will be more optimized.

over 4 years ago · Santiago Trujillo Report

0

Here are some ways to load large list of data:

Note: I have mentioned some npm libraries within brackets for ease, but these functionalities can be self-implemented as well.

  1. pagination (https://www.npmjs.com/package/react-paginate)
  2. inifinite scroll (https://www.npmjs.com/package/react-infinite-scroll-component)

Also check this blog for more options and explanation.

over 4 years ago · Santiago Trujillo Report

0

In case you're not interested in paginating, you should use a virtual list.

You can use react-virtualized, or try building one from scratch

over 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!