Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!