Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

106
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda