I Used "react-navigation": "^4.0.10", "react-navigation-drawer": "^2.3.2",
and implement a drawer and inside them, I added my item, one of them is "Call us" and it should open a phone so I used for it Linking and I don't know if that's a good way to invoke a function instead of Screen as default in RN-drawer
so I do that's But after click to this item my app crashed and stop to work!! so how can I achieve this?
const DrawerNavigator = createDrawerNavigator({
...
CallUsDrawer: {
screen: () => Linking.openURL(`tel:0597093830`),
navigationOptions: {
drawerLabel: 'call us',
drawerIcon: () => <Icon name="ios-call" size={28} color="#1E558E" />,
},
},
...
});