嘿,我有这样的代码
render() {
const { navigation } = this.props;
let title = navigation.getParam('title');
let TabTaskDetail = createMaterialTopTabNavigator({
'Detail': {
navigationOptions: {
tabBarLabel: 'Detail',
},
screen: Detail
})
return (
<SafeAreaView flex={1}>
<TabTaskDetail />
</SafeAreaView>
);
} }
class Detail extends Component {
render() {
return (
<Text>
{this.props.data}
</Text>
)
}
}
从我的代码如何获取标题(navigation.getParam('title'))到我的Detail类?
谢谢