Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Change opacity for hidden tabs only when not using rn-screens #80

Merged
merged 1 commit into from Dec 18, 2018

Conversation

kmagiera
Copy link
Member

When using react-native screens we don't need to hide invisible tabs using opacity. This in conjunctions with "active" property normally used by screens where causing blinking effect when new tabs got activated as in some cases opacity would update in a different UI transaction (this would only surface on Android).

This change removes the use of opacity style when react-native-screens are active and solely relies on active property in that case. When rn-screens are off we fallback to rendering View and use opacity as before (this is now done in ResourceSavingScene).

Motivation

Fix blinking effect on Android when switching tabs #5382

Test plan

  1. Run RN-screens sample app with and w/o screens enabled or try the code from this snack -> https://snack.expo.io/rklSkM-xE
  2. Try this on a low end Android device for consistent repro
  3. Switch between tabs and see the content disappear for one frame with screens ON when this change isn't active and see this issue gone with this change applied

@satya164 satya164 merged commit 542a5cc into master Dec 18, 2018
@satya164 satya164 deleted the screens-blink branch December 18, 2018 15:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants