React-native-navigation: [iOS] Topbar flicker when changing tabs and then pushing on that tab's stack

Created on 1 Apr 2020  路  2Comments  路  Source: wix/react-native-navigation

Issue Description

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:
topbarrepro

Steps to Reproduce / Code Snippets / Screenshots

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.


Environment

  • React Native Navigation version: 6.4.0
  • React Native version: 0.61.5
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator/Device, 13.3.1/13.4, Release
iOS acceptebug reproduction provided 馃搶 pinned

Most helpful comment

I went ahead and updated to XCode 11.4 and iOS 13.4 and still observing the same regression.

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nbolender picture nbolender  路  3Comments

yayanartha picture yayanartha  路  3Comments

birkir picture birkir  路  3Comments

bjacog picture bjacog  路  3Comments

yedidyak picture yedidyak  路  3Comments