I'm running into a weird bug which has a randomness factor to it. It seems to be some kind of race condition when updating the currentTabIndex and then directly pushing on the newly navigated tab's stack. (Only reproduces in Release version)
Gif of it happening 1/3 times:
Reproduction branch: https://github.com/ItsNoHax/react-native-navigation/tree/reproduce-white-topbar-flash
Click on green button 'Update merge options and push' -> Observe topbar -> Click on Layout tab -> Repeat till topbar flickers grey
Code snippet:
Navigation.mergeOptions('bottomTabs', {
bottomTabs: {
currentTabIndex: 2,
},
});
Navigation.push('navigationStack', Screens.FlatListScreen)
EDIT:
It seems as a temporary workaround I can add a 100ms sleep between merging options and doing a push. Not the prettiest, but it works.
I went ahead and updated to XCode 11.4 and iOS 13.4 and still observing the same regression.
Just want to update versions, the same issue is still present on
React Native Navigation version: 6.8.0
React Native version: 0.62.2
Most helpful comment
I went ahead and updated to XCode 11.4 and iOS 13.4 and still observing the same regression.