Remove navigationOptions from component props (#1231)

This commit is contained in:
Mike Grabowski
2017-04-26 13:36:00 +02:00
parent 7ef31e0d49
commit d58da53e9e
5 changed files with 1 additions and 20 deletions

View File

@@ -78,7 +78,6 @@ export default function createNavigationContainer<T: *>(
const {
navigation,
screenProps,
navigationOptions,
...containerProps
} = props;

View File

@@ -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}
/>
);
}

View File

@@ -44,10 +44,6 @@ class DrawerScreen extends PureComponent<void, Props, void> {
screenProps={screenProps}
component={Content}
navigation={childNavigation}
navigationOptions={router.getScreenOptions(
childNavigation,
screenProps,
)}
/>
);
}

View File

@@ -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} />;
}
}

View File

@@ -66,10 +66,6 @@ class TabView extends PureComponent<void, Props, void> {
screenProps={screenProps}
component={TabComponent}
navigation={childNavigation}
navigationOptions={this.props.router.getScreenOptions(
childNavigation,
screenProps,
)}
/>
);
};