Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lets add a screenBackgroundColor as a prop in navigatorStyle #63

Closed
wants to merge 1 commit into from
Closed

Lets add a screenBackgroundColor as a prop in navigatorStyle #63

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 18, 2016

By default the view backgroundColor is white. This produces a white flickering for some of us when using dark backgroundColor for the Screen View, because when we use navigator.push, a new RootView is created and React styles applies not directly. So what happens is the following:

  1. Navigator takes the registered component
  2. Create a new ReactView, which has by default backgroundColor white!
  3. Applies the navigation
  4. React styles will get applied

This commit adds a new navigatorStyle property screenBackgroundColor, which will get applied directly to the view as the backgroundColor, before React applies the backgroundColor from the actual styles.

By default the view backgroundColor is white. This produces a white flickering for some of us when using dark backgroundColor in the <View />, because when we use push a new RootView is created and React styles applies not directly. So what happens is the following:

0. Navigator takes the registered component
1. Create a new ReactView, which has by default backgroundColor white!
2. Applies the navigation
<Here we see the flickering>
3. React styles will get applied

This commit adds a new navigatorStyle property `screenBackgroundColor`, which will get applied directly to the view as the backgroundColor, before React applies the backgroundColor from the actual styles.
@drorbiran
Copy link
Contributor

Hi, we wanted to update you that we are currently postponing the processing of pull requests.
Please refer to React native controllers evolution, we'll appreciate your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant