Backed out D3033933

Reviewed By: hedgerwang

Differential Revision: D3273603

fb-gh-sync-id: e013fd3efd793960d076d2a01447b2a11f483ede
fbshipit-source-id: e013fd3efd793960d076d2a01447b2a11f483ede
This commit is contained in:
Eric Vicenti 2016-05-09 08:32:29 -07:00 committed by Facebook Github Bot 0
parent 57ceeafd4f
commit b24d471fb2
5 changed files with 2 additions and 11 deletions

View File

@ -122,6 +122,7 @@ class NavigationAnimatedExample extends React.Component {
return ( return (
<NavigationCard <NavigationCard
{...props} {...props}
key={'card_' + props.scene.navigationState.key}
renderScene={this._renderScene} renderScene={this._renderScene}
/> />
); );

View File

@ -188,7 +188,6 @@ class NavigationAnimatedView
onNavigate, onNavigate,
position, position,
scene, scene,
key: 'scene_' + scene.navigationState.key,
scenes, scenes,
}); });
} }
@ -208,7 +207,6 @@ class NavigationAnimatedView
return renderOverlay({ return renderOverlay({
layout: this.state.layout, layout: this.state.layout,
key: navigationState.key,
navigationState, navigationState,
onNavigate, onNavigate,
position, position,

View File

@ -66,7 +66,6 @@ const scene = PropTypes.shape({
/* NavigationSceneRendererProps */ /* NavigationSceneRendererProps */
const SceneRenderer = { const SceneRenderer = {
key: PropTypes.string.isRequired,
layout: layout.isRequired, layout: layout.isRequired,
navigationState: navigationParentState.isRequired, navigationState: navigationParentState.isRequired,
onNavigate: PropTypes.func.isRequired, onNavigate: PropTypes.func.isRequired,
@ -98,7 +97,6 @@ function extractSceneRendererProps(
props: NavigationSceneRendererProps, props: NavigationSceneRendererProps,
): NavigationSceneRendererProps { ): NavigationSceneRendererProps {
return { return {
key: props.scene.navigationState.key,
layout: props.layout, layout: props.layout,
navigationState: props.navigationState, navigationState: props.navigationState,
onNavigate: props.onNavigate, onNavigate: props.onNavigate,

View File

@ -66,9 +66,6 @@ export type NavigationSceneRendererProps = {
// The scene to render. // The scene to render.
scene: NavigationScene, scene: NavigationScene,
// The key of the scene
key: string,
// All the scenes of the containing view's. // All the scenes of the containing view's.
scenes: Array<NavigationScene>, scenes: Array<NavigationScene>,
}; };

View File

@ -121,15 +121,12 @@ class NavigationView extends React.Component<any, Props, any> {
scenes, scenes,
} = this.state; } = this.state;
const scene = scenes[navigationState.index];
const sceneProps = { const sceneProps = {
key: 'scene_' + scene.navigationState.key,
layout, layout,
navigationState: navigationState, navigationState: navigationState,
onNavigate: onNavigate, onNavigate: onNavigate,
position: this._position, position: this._position,
scene, scene: scenes[navigationState.index],
scenes, scenes,
}; };