I would like to hide the Back button in the top-left corner, but I don't have any idea how to do it with react-navigation or react-native.
Just tried to use static navigationOptions = { header: null }
but the < Back
button was still alive.
I was using Modal
and it works, but I want to know how to hide < Back
button without using Modal
.
Thank you in advance!
Using headerLeft: () => <></>
works great in iOS, but in Android was still displaying the default back button.
I was able to hide it by adding the headerBackVisible: false
on the screenOptions of the Stack Navigator or you could include it on the options for every Stack Screen.
More info at https://reactnavigation.org/docs/native-stack-navigator/#headerbackvisible
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With