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

109
Vistas
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
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