class ProfileV extends React.Component {
onPressSearch = term => {
console.log(term);
}
homePage = () => {
this.props.navigation.navigate('Profile');
}
render(){
return (
<Container style={styles.MainContainer}>
<SearchHeader
home={this.homePage}
/>
<Content style = {styles.content}>
<Title style = {styles.text}> TRENDING </Title>
</Content>
</Container>
);
}
}
export default ProfileV;
错误:{
-undefined不是对象(正在评估'_this.props.navigation.navigate')
-主页 ProfileV.js:33:26
}
我该如何解决?