From 99964aef1deb28b029d574342f846f50e99c5fbd Mon Sep 17 00:00:00 2001 From: Dan Gilbert Date: Fri, 29 Jan 2016 11:39:05 -0600 Subject: [PATCH] Implement renderScene API for NavigatorIOS. --- .../Components/Navigation/NavigatorIOS.ios.js | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/Libraries/Components/Navigation/NavigatorIOS.ios.js b/Libraries/Components/Navigation/NavigatorIOS.ios.js index 501958170ec66a..d2fa3099522b95 100644 --- a/Libraries/Components/Navigation/NavigatorIOS.ios.js +++ b/Libraries/Components/Navigation/NavigatorIOS.ios.js @@ -291,7 +291,7 @@ var NavigatorIOS = React.createClass({ /** * The React Class to render for this route */ - component: PropTypes.func.isRequired, + component: PropTypes.func, /** * The title displayed in the navigation bar and the back button for this @@ -805,29 +805,24 @@ var NavigatorIOS = React.createClass({ }, _routeToStackItem: function(routeArg: Route, i: number) { - var {component, wrapperStyle, passProps, ...route} = routeArg; + var {wrapperStyle, ...route} = routeArg; var {itemWrapperStyle, ...props} = this.props; - var shouldUpdateChild = - this.state.updatingAllIndicesAtOrBeyond != null && - this.state.updatingAllIndicesAtOrBeyond >= i; - var Component = component; + return ( - - - - - + + {this.props.renderScene( + route, + this, + )} + ); },