UIExplorer: fix navigation animation by using props passed to renderTitleComponent

Summary:
The animation shown in the UIExplorer example for NavigationExperimental's NavigationHeader is not working correctly. Due to an incomplete use of the `renderTitleComponent()` callback, interpolation is not working correctly in this example.

Even if the animation error is subtle, since the examples are followed by developers quite closely, the bug may multiply if not corrected in the sample code.

This is a really *tiny* modification that fixes that particular animation.
Closes https://github.com/facebook/react-native/pull/9067

Differential Revision: D3669140

Pulled By: javache

fbshipit-source-id: 6dab36a9132da2f704e9a074ae26e744c3420cde
This commit is contained in:
G. Grau 2016-08-04 03:28:24 -07:00 committed by Facebook Github Bot 9
parent e5ccdc4c2d
commit 063f221e56
1 changed files with 2 additions and 2 deletions

View File

@ -333,10 +333,10 @@ const YourHeader = createAppNavigationContainer(class extends Component {
this.props.navigate({type: 'pop'});
}
_renderTitleComponent(): ReactElement {
_renderTitleComponent(props: Object): ReactElement {
return (
<NavigationHeader.Title>
{this.props.scene.route.key}
{props.scene.route.key}
</NavigationHeader.Title>
);
}