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