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

182
Vistas
React Native: Cannot press button during rapid re-rendering of screen

My app connects to a bluetooth device and is constantly retrieving data from it, storing the data in state, and rendering it to the screen. Additionally, I have a button on the screen that needs to do something (say, console log a message). My problem is that the setState is triggering a re-render so rapidly (think milliseconds) that when you press the button, nothing happens. If I keep pressing the button over and over, eventually it will catch and console log. How can I fix this where I can show the updated data constantly while also being able to click on the button?

I have tried removing the rapid set states and everything works as expected, so I am confident the button functionality is due to the quick, repetitive re-rendering.

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