difference, is different
This commit is contained in:
parent
00689d3b0c
commit
ec84c3f8d8
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ Create a "throttling" decorator `throttle(f, ms)` -- that returns a wrapper.
|
|||
|
||||
When it's called multiple times, it passes the call to `f` at maximum once per `ms` milliseconds.
|
||||
|
||||
The difference with debounce is that it's completely different decorator:
|
||||
Compared to the debounce decorator, the behavior is completely different:
|
||||
- `debounce` runs the function once after the "cooldown" period. Good for processing the final result.
|
||||
- `throttle` runs it not more often than given `ms` time. Good for regular updates that shouldn't be very often.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue