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

103
Views
El rendimiento de React Component se reduce al representar una lista grande usando una matriz
<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; }

aquí los objetos son un estado de tipo matriz y contienen más de 250 registros. ¿Cómo puedo representar esto de manera más eficiente con el mismo estilo?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Puede usar la paginación y limitar los registros en lugar de mostrarlo todo. Y cuando intente renderizar más, simplemente puede agregarlo al previous state . De esta manera, no perderá sus previous fetched records y estará más optimizado.

over 4 years ago · Santiago Trujillo Report

0

Aquí hay algunas formas de cargar una gran lista de datos:

Nota: He mencionado algunas bibliotecas npm entre paréntesis para simplificar, pero estas funcionalidades también se pueden implementar automáticamente.

  1. paginación ( https://www.npmjs.com/package/react-paginate )
  2. Desplazamiento infinito ( https://www.npmjs.com/package/react-infinite-scroll-component )

Consulte también este blog para obtener más opciones y explicaciones.

over 4 years ago · Santiago Trujillo Report

0

En caso de que no esté interesado en paginar, debe usar una lista virtual.

Puede usar react-virtualized o intentar construir uno desde cero

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!