[NavigationExperimental] Bug on navigation header title effect
See original GitHub issueIn the first route, the navigation bar is hidden. In the second one, it’s visible and blue. When I swipe from one to another, you can see a rectangle with the background:
Important code:
_renderHeader(props) {
const { scene: { route: { navigationBarHidden } } } = props;
return navigationBarHidden ? null : <NavigationHeader style={{backgroundColor: '#3ec4e3'}}/>;
}
_renderScene(props) {
const { scene: { route: { Component: SceneComponent, navigationBarHidden, passProps } } } = props;
return (
<View>
{navigationBarHidden ? null : this._renderHeader(props)}
<SceneComponent navigator={this} navigatorProps={props} {...passProps} />
</View>
);
}
In the first route, navigationBarHidden is true.
- React Native version: 0.32.0
- Platform(s) (iOS, Android, or both?): iOS
- Operating System (macOS, Linux, or Windows?): macOS 10.12
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
StackNavigator reference - React Navigation
StackNavigator reference. Provides a way for your app to transition between screens where each new screen is placed on top of a stack....
Read more >React Native Navigation - Christos Sotiriou
NavigationExperimental is the newest Navigation method from Facebook for React Native, allowing full control over navigation, ...
Read more >React-native navigation experimental example?
I started using react-native few weeks ago. For my first app, I used navigator for the navigation with its navigationbar component to display ......
Read more >react navigation disable animation - You.com | The AI Search ...
I want to make sure the animation happens only to the screen and not to my header component. Since the header will a...
Read more >aksonov/react-native-router-flux - Gitter
Or are the NavigationExperimental bugs still a big barrier? ... 0.25.1 was "Fix an issue when the title in NavigationExperimentalHeader would block touches ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found


@brunolemos besides the “bug” you have this already looks great. I wonder hwo you achieved this because I also don’t have a NavigationHeader on my first screen but when I’m sliding to go back from the second screen (where I do have a Navigation Header), the header is also visible on the first screen until the transition is completed…
My Code looks something like this:
I would really appreciate if you could share your code.
Thanks!
@brunolemos I ended up hacking into the core components of NavigationExperimental to achieve the desired behavior. This is most likely not the way to go but it works for me for now. I uploaded the files that I used/modified to this Gist
Then I use the header like this:
And then my initial route has a property
hideNavBarNOTE: This is just something I came up quick and dirty. There are also some other modifications in the Gist that I used to further customize it to my needs. There are a lot of limitations with this (e.g. this only works if the first route has NO header, for routes coming up after you’d need to do some further tweaking). Take this as an inspiration do create your own 😉