diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js index d04e13373ff3c0..41d2d7154e2075 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStack.js @@ -42,8 +42,6 @@ const ReactComponentWithPureRenderMixin = require('react/lib/ReactComponentWithP const StyleSheet = require('StyleSheet'); const View = require('View'); -const emptyFunction = require('fbjs/lib/emptyFunction'); - const {PropTypes} = React; const {Directions} = NavigationCardStackPanResponder; @@ -70,7 +68,6 @@ type Props = { type DefaultProps = { direction: NavigationGestureDirection, - renderOverlay: ?NavigationSceneRenderer, }; /** @@ -102,7 +99,6 @@ class NavigationCardStack extends React.Component { static defaultProps: DefaultProps = { direction: Directions.HORIZONTAL, - renderOverlay: emptyFunction.thatReturnsNull, }; constructor(props: Props, context: any) { @@ -134,22 +130,14 @@ class NavigationCardStack extends React.Component { _render(props: NavigationTransitionProps): ReactElement { const { - navigationState, - } = props; + renderOverlay + } = this.props; let overlay = null; - const renderOverlay = this.props.renderOverlay; - if (renderOverlay) { - const route = navigationState.routes[navigationState.index]; - - const activeScene = props.scenes.find( - scene => !scene.isStale && scene.route === route ? scene : undefined - ); - overlay = renderOverlay({ ...props, - scene: activeScene + scene: props.scene, }); } @@ -157,8 +145,7 @@ class NavigationCardStack extends React.Component { scene => this._renderScene({ ...props, scene, - }), - this + }) ); return (