Open michaelAndersonCampingWorld opened 7 years ago
@michaelAndersonCampingWorld I have the same error with react-native 40.
But you could do something like that:
handleOnPress = () => {
// this below code doesn't work.
// const { navigator } = this.props;
// navigator.pop()
const { navigation } = this.props;
navigation.getNavigator(':id').pop()
}
render() {
return (
<TouchableOpacity onPress={this.handleOnPress} style={styles.centerStart}>
<Text>End Chat</Text>
</TouchableOpacity>
);
}
I'm trying to make a left button on the navigation bar will call
navigator.pop
when pressed and has different text than default.Here is the component:
and I use it on a route
When I actually click on endchat I get the following screen
Is this a bug with ex-navigation or core-decorators, or an incompatibility with react-native 37.