React-native-screens: Flicker when navigating around

Created on 2 May 2021  路  12Comments  路  Source: software-mansion/react-native-screens

Description

When navigating back, after navigation animation is finished previous screen is shown for a moment. After it disappears. Sometimes it works fine.
See footage below

Screenshots

https://user-images.githubusercontent.com/5978212/116809884-92e34280-ab51-11eb-94d1-ee7314125ead.mov

https://user-images.githubusercontent.com/5978212/116809890-9971ba00-ab51-11eb-9ec5-a3dd267f5d94.mov

Steps To Reproduce

  1. Navigate to second screen
  2. Go back to previous screen

Expected behavior

Previous screen shouldn't be shown after navigating back

Actual behavior

Previous screen is shown for very short moment after navigating back

Package versions

Most helpful comment

Just in case it's helpful. We don't use Expo and have the exact same issue:

  • React Native: 0.64
  • React Native Screens: 3.2.0 (also tried on 2.x with same issue)
  • React Navigation: 4.4.4
  • React Navigation Stack: 2.10.4
  • React Navigation Tabs: 2.11.1

Disabling react-native-screens stops the flicker.

All 12 comments

Same issue here but not as obvious. For me it happens from the drawer.

Could you provide a minimal reproducible example of your issue?

Could you provide a minimal reproducible example of your issue?

I will try later today

It seems it's harder to reproduce on blank project.
At the end of the video previous page flickers for a moment
https://user-images.githubusercontent.com/5978212/117048331-e907df80-ad23-11eb-8f2e-02a32251d85f.mp4

Here's the repo
https://github.com/alexandrius/screens-flicker

Just in case it's helpful. We don't use Expo and have the exact same issue:

  • React Native: 0.64
  • React Native Screens: 3.2.0 (also tried on 2.x with same issue)
  • React Navigation: 4.4.4
  • React Navigation Stack: 2.10.4
  • React Navigation Tabs: 2.11.1

Disabling react-native-screens stops the flicker.

@obernal disabling = remove from package.json?

@obernal disabling = remove from package.json?

enableScreens(false) seems to be enough.

I don't know how disabling react-native-screens fixes the issue.

I don't know how disabling react-native-screens fixes the issue.

My comment is not meant to be interpreted as a fix but as additional information that the flicker only happens when it's enabled, confirming this is Very likely a react-native-screens issue. Or do you mean you see the flicker even after disabling it?

@obernal Thanks for the clarifications. Well yes, the flicker disappears when I disable react-native-screens. Does the latest release of screens fixes the issue? I haven't tried it since my project is using expo.

@obernal Thanks for the clarifications. Well yes, the flicker disappears when I disable react-native-screens. Does the latest release of screens fixes the issue? I haven't tried it since my project is using expo.

enableScreens(false) fixes the flicker for me as well

@alexandrius I made a snack from your repo, just in case that helps the debugging process. https://snack.expo.io/@ryantg/github.com-alexandrius-screens-flicker

Was this page helpful?
0 / 5 - 0 ratings