It's taking me forever to figure out the obvious, would appreciate some help.
Im using a stack navigator, when a button is pressed it will simply go to another page.
In app.js I created a stack navigator:
const Switcher = createStackNavigator(
{
TaskPg: ListScreen,
AboutPg: AboutScreen
},
{
initialRouteName: "TaskPg",
defaultNavigationOptions: {
title: 'BlueList'
}
}
)
In the ListScreen there is a button the user can press to go to the about page
<Button
onPress={() => this.props.navigation.navigate(AboutScreen)}
title="About App" />
Run code and every time I press the button I get the error undefined is not an object (evaluating this.props.navigation)