I have use const to show components. Now when I use react navigation for a button in const, I see this error: undefined is not an object (evaluating '_this.props.navigation.navigate')
I have try to add navigation={this.props.navigation} to button for allow nabigation, But not worked.
const WomenTab = () => (
<View>
<Button onPress={() => {
this.props.navigation.dispatch(StackActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Wallet' })
],
}))
}}>
<Text>Click</Text>
</Button>
<View>
);
Library link: http://github.com/react-native-community/react-native-tab-view