Let me explain properly what I want to do.
I have these screens in react-native mobile-app
App.js
WalletDetails.js
Then I have another screen called PaymentDetails.js amongst many other screens
So what I want to do is that I need a button with onPress
that would open directly walletDetails.js screen from PaymentDetails.js.
I have this code already on the paymentdetails page
<TouchableOpacity style={styles.cardPayBtn} onPress={()=>props.navigation.navigate("WalletDetails"); }}> <Text style={styles.buttonTitle}>{userdata && userdata.usertype == 'rider' ? t('payWithCard') : t('request_payment')}</Text> </TouchableOpacity>