drawer-example
drawer-example copied to clipboard
How to prevent double clicking on Drawer opening icon
Whenever I'm clicking drawer opening icon for multiple times, it goes into infinite state and opening and closing continuously. I need help.
headerLeft: <View style={styles.leftIconContainer}>
<Icon name="bars" style={styles.icon} onPress={() => {
(navigation.state.index === 0) ? navigation.navigate('DrawerOpen') : navigation.navigate('DrawerClose')
}} />
</View>,
It will fix it ;)
I've done this by using debounce from 'lodash' library. Anyway Thanks @rimiti
You're welcome, can you close the issue ? 🚀🙏🏻