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

104
Views
VirtualizedList onViewableItemsChanged not update lasted props value

I'm facing this issue in Android with ReactNative.

My application have a button with onPress event and VirtualizedList with onViewableItemsChanged event. Both events call a function named aa() that print out props.activeTabKey value to console.

  1. When application launched the props.activeTabKey are set to "AA". Both events print "AA" to console, that's good.
  2. When i change the props.activeTabKey to "BB". The onPress event print "BB", but the onViewableItemsChanged still print "AA".
  3. Next, I change props.activeTabKey to "CC". The onPress event print "CC" and the onViewableItemsChanged print "BB".

It's look like onViewableItemsChanged event not see the last value of props. I have change the aa() function to use useCallback(), but the issue still happend.

Please help me to resolve this. Thanks in advance. enter image description here

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!