mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
D3321403 [NavigationExperimental][CleanUp]: Rename scene.navigationState to scene.route.
Summary: [public / experimental API breaking change] The data type of `scene.navigationState` is `NavigationRoute`. Rename `scene.navigationState` to `scene.route` to avoid confusion such as treating `scene.navigationState` as the actual global navigation state (type: NavigationState). Reviewed By: ericvicenti Differential Revision: D3331076 fbshipit-source-id: 3ed989cc8492d398cbeb1b12186459deb261d1fb
This commit is contained in:
committed by
Facebook Github Bot 4
parent
a45d025385
commit
fb5d0ff587
@@ -69,14 +69,13 @@ class SceneView extends React.Component<any, SceneViewProps, any> {
|
||||
|
||||
static propTypes = {
|
||||
sceneRenderer: PropTypes.func.isRequired,
|
||||
sceneRendererProps:
|
||||
PropTypes.shape(NavigationPropTypes.SceneRenderer).isRequired,
|
||||
sceneRendererProps: NavigationPropTypes.SceneRenderer,
|
||||
};
|
||||
|
||||
shouldComponentUpdate(nextProps: SceneViewProps, nextState: any): boolean {
|
||||
return (
|
||||
nextProps.sceneRendererProps.scene.navigationState !==
|
||||
this.props.sceneRendererProps.scene.navigationState
|
||||
nextProps.sceneRendererProps.scene.route !==
|
||||
this.props.sceneRendererProps.scene.route
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
|
||||
|
||||
static propTypes = {
|
||||
direction: PropTypes.oneOf([Directions.HORIZONTAL, Directions.VERTICAL]),
|
||||
navigationState: NavigationPropTypes.navigationParentState.isRequired,
|
||||
navigationState: NavigationPropTypes.navigationState.isRequired,
|
||||
onNavigate: NavigationPropTypes.SceneRendererProps.onNavigate,
|
||||
renderOverlay: PropTypes.func,
|
||||
renderScene: PropTypes.func.isRequired,
|
||||
|
||||
Reference in New Issue
Block a user