I have a question about this code, I want to add an Alert if you press the BackButton but only in 2 navigation screen (MARKETPLACE and SHOP)The Alert is to confirm is you want to back or cancel if notHow can I do that?My BackButton is the first Stack.ScreenThis is the code:
<Stack.Navigator><Stack.Screen name='Root' component={DrawerNavigator} options={{ headerShown: false, title: '', headerBackTitle: 'BackButton }}/><Stack.Screen options={{ title: 'MARKETPLACE' }} name='Marketplace' component={Marketplace} /><Stack.Screen options={{ title: 'SHOP' }} name='Shop' component={Shopping} /><Stack.Screen options={{ title: 'CHECKOUT' }} name='Checkout' component={Checkout} /><Stack.Screen options={{ title: 'CHECK' }} name='Check' component={CheckSuccess} /></Stack.Navigator>