Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

what is the difference between throttling and debounce and raf throttling in react

//Throttling prevents a function from being called more than once
//in a given window of time (ms).
throttle(this.handleClick, 1000)

//Debouncing ensures that a function will not be executed until 
//after a certain amount of timehas passed since it was last called. 
debounce(emitChange, 250);
 
PREVIOUS NEXT
Tagged: #difference #throttling #debounce #raf #throttling #react
ADD COMMENT
Topic
Name
1+5 =