Inactive tabs are suspended and don't rerender when the theme changes from light to dark, for example. Because the tab change happens on the native side, the light version of the tab will show until the dark version renders when the tab is unsuspended. This can result in a flash of unstyled content (FOUC).
Added a preventFouc prop. Set this to true on theme change and set it back to false when the tab changes. Then, whenever any inactive tab is first pressed, the TabBar triggers the change on the JavaScript side instead of the native side.
Fixes #784
Inactive tabs are suspended and don't rerender when the theme changes from light to dark, for example. Because the tab change happens on the native side, the light version of the tab will show until the dark version renders when the tab is unsuspended. This can result in a flash of unstyled content (FOUC).
Added a
preventFouc
prop. Set this to true on theme change and set it back to false when the tab changes. Then, whenever any inactive tab is first pressed, the TabBar triggers the change on the JavaScript side instead of the native side.