mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 09:21:09 +08:00
Remove navigationOptions from component props (#1231)
This commit is contained in:
@@ -78,7 +78,6 @@ export default function createNavigationContainer<T: *>(
|
||||
const {
|
||||
navigation,
|
||||
screenProps,
|
||||
navigationOptions,
|
||||
...containerProps
|
||||
} = props;
|
||||
|
||||
|
||||
@@ -387,7 +387,6 @@ class CardStack extends Component {
|
||||
screenProps={screenProps}
|
||||
navigation={navigation}
|
||||
component={SceneComponent}
|
||||
navigationOptions={options}
|
||||
/>
|
||||
</View>
|
||||
{this._renderHeader(scene, headerMode)}
|
||||
@@ -399,7 +398,6 @@ class CardStack extends Component {
|
||||
screenProps={this.props.screenProps}
|
||||
navigation={navigation}
|
||||
component={SceneComponent}
|
||||
navigationOptions={options}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,6 @@ class DrawerScreen extends PureComponent<void, Props, void> {
|
||||
screenProps={screenProps}
|
||||
component={Content}
|
||||
navigation={childNavigation}
|
||||
navigationOptions={router.getScreenOptions(
|
||||
childNavigation,
|
||||
screenProps,
|
||||
)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
10
packages/react-navigation/src/views/SceneView.js
vendored
10
packages/react-navigation/src/views/SceneView.js
vendored
@@ -13,7 +13,6 @@ import type {
|
||||
type Props = {
|
||||
screenProps?: {},
|
||||
navigation: NavigationScreenProp<NavigationRoute, NavigationAction>,
|
||||
navigationOptions: *,
|
||||
component: ReactClass<NavigationNavigatorProps<NavigationRoute>>,
|
||||
};
|
||||
|
||||
@@ -34,16 +33,9 @@ export default class SceneView extends PureComponent<void, Props, void> {
|
||||
const {
|
||||
screenProps,
|
||||
navigation,
|
||||
navigationOptions,
|
||||
component: Component,
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<Component
|
||||
screenProps={screenProps}
|
||||
navigation={navigation}
|
||||
navigationOptions={navigationOptions}
|
||||
/>
|
||||
);
|
||||
return <Component screenProps={screenProps} navigation={navigation} />;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +66,6 @@ class TabView extends PureComponent<void, Props, void> {
|
||||
screenProps={screenProps}
|
||||
component={TabComponent}
|
||||
navigation={childNavigation}
|
||||
navigationOptions={this.props.router.getScreenOptions(
|
||||
childNavigation,
|
||||
screenProps,
|
||||
)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user