Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

99
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda