From 063f221e5671d53af0e2b5e4b0dda555bd8ddefd Mon Sep 17 00:00:00 2001 From: "G. Grau" Date: Thu, 4 Aug 2016 03:28:24 -0700 Subject: [PATCH] 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 --- .../NavigationCardStack-NavigationHeader-Tabs-example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/UIExplorer/js/NavigationExperimental/NavigationCardStack-NavigationHeader-Tabs-example.js b/Examples/UIExplorer/js/NavigationExperimental/NavigationCardStack-NavigationHeader-Tabs-example.js index ec661b0862..eea7d56d7c 100644 --- a/Examples/UIExplorer/js/NavigationExperimental/NavigationCardStack-NavigationHeader-Tabs-example.js +++ b/Examples/UIExplorer/js/NavigationExperimental/NavigationCardStack-NavigationHeader-Tabs-example.js @@ -333,10 +333,10 @@ const YourHeader = createAppNavigationContainer(class extends Component { this.props.navigate({type: 'pop'}); } - _renderTitleComponent(): ReactElement { + _renderTitleComponent(props: Object): ReactElement { return ( - {this.props.scene.route.key} + {props.scene.route.key} ); }