Skip to content

[Android] First-mount white flash for screens inside nested native-stack inside bottom-tabs (regression in 4.25.0) #4043

Description

@DragomirAndrei19

Description

After upgrading react-native-screens from 4.24.0 to 4.25.0, I noticed a regression: when switching between tabs for the first time, while the screen is being mounted, the screen content flashes white or remains white for about a second.

This did not happen in the previous version. Subsequent tab switches do not seem to trigger the same behavior.

These are minimal reproduction examples. In a more complex app I am working on, the issue is much more noticeable: the white flash appears to last longer, and it also happens on real devices and in release builds. Perhaps it's also tied to screen content somehow.

react-native-screens 4.24.0 react-native-screens 4.25.0
424.webm
425.webm

I prepared two separate repositories to make this easier to reproduce:

  1. react-native-screens 4.24.0 — works as intended
  2. react-native-screens 4.25.0 — regression

The only difference between the two repositories is the related React Navigation package versions.

The 4.24.0 repo uses:

├── @react-navigation/bottom-tabs@7.15.9
├── @react-navigation/native-stack@7.14.11
├── @react-navigation/native@7.2.2

The 4.25.0 repo uses:

├── @react-navigation/bottom-tabs@7.16.1
├── @react-navigation/native-stack@7.15.1
├── @react-navigation/native@7.2.4

This is because those React Navigation updates migrated to react-native-screens 4.25.0.

In the 4.24.0 repo, I also downgraded the React Navigation packages because the newer versions caused another issue at app launch. That might be a separate bug, unless those React Navigation versions make react-native-screens 4.25.0 mandatory. Therefore, keeping react-native-screens to 4.24.0 to mitigate this issue but updating the react-navigation libraries results in this error

Image

I also prepared a ready to install repo for this.

Steps to reproduce

  1. Download the two repos, npm install and compare

Snack or a link to a repository

https://github.com/DragomirAndrei19/react-native-screens-white-flash-425-regression

Screens version

4.25.0

React Native version

0.85.3

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Release mode

Device

Android emulator

Device model

Pixel 9a Simulator

Acknowledgements

Yes

Metadata

Metadata

Assignees

Labels

platform:androidIssue related to Android part of the libraryrepro-providedA reproduction with a snack or repo is provided

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions