122
rated 0 times
[
127]
[
5]
/ answers: 1 / hits: 58279
/ 8 Years ago, sun, december 18, 2016, 12:00:00
I'm playing around with React Native and lodash's debounce.
Using the following code only make it work like a delay and not a debounce.
<Input
onChangeText={(text) => {
_.debounce(()=> console.log(debouncing), 2000)()
}
/>
I want the console to log debounce only once if I enter an input like foo. Right now it logs debounce 3 times.
More From » reactjs