I have a TouchableHighlight wrapping a Text block that when tapped, opens a new scene (which I\'m using react-native-router-flux).
It\'s all wo
I fixed using this lodash method below,
Step 1
import { debounce } from 'lodash';
Step 2
Put this code inside the constructor
this.loginClick = debounce(this.loginClick .bind(this), 1000, {
leading: true,
trailing: false,
});
Step 3
Write on your onPress button like this
onPress={() => this.props.skipDebounce ? this.props.loginClick : this.loginClick ()}
Thanks,