I am getting an error while accessing parameter by the getParam method like following .
const source = this.props.navigation.getParam("source","0")
const doFollow = this.props.navigation.getParam("doFollow","")
I have passed the parameter using the following method
this.props.navigation.navigate('Details', {otherParam:"anything"})
It depends on your react-navigation version that you are using.
In v4
this.props.navigation.getParam('source')
In v5
this.props.route.params.source
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