React Native NavigationDrawer - How can i launch an alert inside createDrawerNavigation
问题 i am trying to trigger a logout (an alert to confirm) from an item click in a navDrawer made with reactnavigation. Do you know an efficient way to do that? This is the code in the DrawerNavigator file: export default createDrawerNavigator({ Home: { screen: Home }, Dashboard: { screen: Dashboard }, Logout: { screen: Logout } } ... And when trying to call the last element (Logout) i know i need to call a class which extends from Component class, but the question like the next code, in this case