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

154
Visualizações
React Native: can calling setstate at least 10 times per second be slow for the app?

I use setState to be able to get the current duration of a video. But I was wondering if with setState, my application could be slow (because setState is called more than 10 times per second)? Knowing that setState is the parent component, and that it contains the video and several other components.
I know there is mobx, or redux. But for this kind of program, setState must be in the parent component for functional reasons...
So do you know if this might be a problem for my app performance ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If it's re-rendering another components that shouldn't get re-rendered, yes this is a performance issue. Also if you don't want to use an external state manager, you can simply use the React context API (https://beta.reactjs.org/learn/scaling-up-with-reducer-and-context). Anyways, in order to fix performance, you may want to research about React.memo (https://www.w3schools.com/react/react_memo.asp).

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