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