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

108
Views
Drawing list of components is slow reactjs

I have a list of components (~50-100), these components are quite advanced; they contain a lot of child elements that obviously takes some effort to be drawn out.

The result is that the UI "freezes" 1-2 seconds when navigating to the page, it actually freezes before getting to the page.

The UI is also a bit laggy when all the components are loaded.

I'm thinking it should be possible to load them in chunks in some way? Or only draw the full component out if it's visible on the screen somehow, and have a skeleton component when it's not in the viewport.

What is the recommended approach here?

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You must avoid useless renders with memo.

Be careful not to call APIs for no reason.

Also you should use useCallback and useMemo to avoid call methods which return same value for children components.

Context API is a good option to avoid Drilling states as props to nested components.

You could use lazy loading to render children components along with scroll as well.

about 4 years ago · Juan Pablo Isaza 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!