DEV Community

Discussion on: Throttling and Debouncing. Avoiding unnecessary API calls.

Collapse
 
johncerpa98 profile image
John

func() won't be executed right away with the throttle one, I don't understand.

Collapse
 
otamnitram profile image
Martín Mato

Good catch!. Func() was misplaced. It needs to run if the timeout is undefined but not as a callback of it.