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

136
Visualizações
Does simply passing huge amount of props uses any resources?

I was wondering if simply passing a huge amount of props uses any resources if none of them are actually used.
For example

<MyComponent data={data_10kRecord}/> 

VS

<MyComponent data={data_SingleRecord}/>  

MyComponent will use only one of the records and it will use it like this:

data[id]  

So does the first component use more resources than the second component?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Well actually the props system in react is actually just a syntactic sugar that is parsed by babel (or other jsx parser) For an html element that has a normal object named props. So when you pass the 10k records it will create the props object that holds all the records. So far I think the best practice is to pass only the required record instead of creating a a huge props object that will take a place in the memory.

See this and how the bigger your object is the more memory it'll take.

about 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