0
我想提出一个目标我首先使本机应用程序,我得到这个错误:Undefined is not an object (evaluating "this.props.navigation.navigate")
在这部分代码:未定义不是(评估“this.props.navigation.navigate”)
export default class HomeScreen extends React.Component {
render() {
const {navigate} = this.props.navigation;
return (
<View style={styles.container}>
<Text>choose festival</Text>
<Button
title="Select SummerBurst 2017"
onPress={() =>
this.props.navigation.navigate('FestivalScreen', { name: 'SummerBurst' })
}
/>
</View>
);
}
}
我认为这是因为我没有传递反应导航的道具,但我真的不知道该怎么做。我的回购看起来像这样:https://github.com/meurling/festivalApp
谢谢!