React-native-screens: InteractionManager.runAfterInteractions with createStackNativeNavigator

Created on 16 May 2020  路  4Comments  路  Source: software-mansion/react-native-screens

When I'm using the Js implementation I use InteractionManager.runAfterInteractions to delay some process and then display an Alert. But when I'm using this native implementation, this InteractionManager.runAfterInteractions is not working and my processes and alert trigger even before entering the screen stack (just clicking on the button to go to that specific screen is enough to trigger the process and alert). Reading the RN docs I got nothing about this native stack so I dont know if this InteractionManager.runAfterInteractions way is correct or not. So, what would be the proper way, using this native stack, to handle this situation when you need to delay some process or alert after the animation is completed?

All 4 comments

U will prob. wait for these pull requests to land:

499

498

U will prob. wait for these pull requests to land:

499

498

They added a "finishTransitioning" event recently, but it seems like it's not working because nothing is triggered when I use it. So I'm using the "appear" event as a workaround to trigger my Alert after finishing the transition animation. Honestly I don't even know if this "finishTransitioning" is intent for this kind of situations.
NOTE: I'm using the 2.8.0 and react-navigation/native 5.3.2

Navigation events are available in version 2.10.1. Can you check if it is what you need and, if so, can I help you any more or can I close this issue?

Navigation events are available in version 2.10.1. Can you check if it is what you need and, if so, can I help you any more or can I close this issue?

It works! Problem solved. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshua-augustinus picture joshua-augustinus  路  4Comments

bitttttten picture bitttttten  路  3Comments

OmarBasem picture OmarBasem  路  4Comments

bartzy picture bartzy  路  3Comments

chengsokdara picture chengsokdara  路  3Comments