Reputation: 277
I created simple StackNavigator
export const AppNavigator = StackNavigator({
Conversations: {screen: ConversationsContainer},
Chat: {screen: Chat}
}, {
navigationOptions: {
headerTintColor: "#36c3e7"
},
})
and when I navigate from conversations to chat and I tried to press go back button then application crashed with error _this.props.navigation.goBack is not a function
but when I use back gesture on iOS simulator it works.
Upvotes: 2
Views: 1062
Reputation: 265
With my case I had this issue with react-native-navigation v5
. To fix this I did this:
I've added the following on android/app/build.gradle under dependencies
implementation "androidx.appcompat:appcompat:1.1.0-rc01"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02"
wiped the emulator by emulator -avd <device_name> -wipe-data
cd android
&& gradle clean
react-native run-android
Upvotes: 1