Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
React Native Async Interval Function Performance Issue

I have a react native component which is running an async function on an interval timer. When testing this on an old android phone I was surprised to see some serious performance issues.

Any buttons in the UI are completely unresponsive whilst the testIntervalAsync function is running, but oddly the nested ScrollView component is perfectly responsive to touch (it can still be scrolled).

I'm fairly new to react native, so would anyone be able to give any insight into why it runs so slowly?

const TestScreen = ({}: TestScreenProps) => {
...
useEffect(() => {
  const interval = setInterval( async () => {
      testIntervalAsync ();
    }, 1000);

  const testIntervalAsync = async () => {
    for(let i = 0; i < 5000; i++ )
      console.log("Test interval: ", i);
      };

  return (() => {
    clearInterval(interval);
    })
  }, []);

return (
    <Box>
      ...
      <ScrollView>
        ...
      </ScrollView>
      ...
    </Box>
    );
};
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda