Skip to content

Commit

Permalink
docs(throttle): add search terms and use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
MarlonPassos-git committed Aug 22, 2024
1 parent 62f9b3f commit 449601d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/curry/throttle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,14 @@ Source Invocations: x - - - - - - - - - - - - x - - - - - - - - - - - - - x - -
```

In this diagram, 'x' represents function invocations, and '-' represents time passing.

### Search terms

- Often called `throttle`, `limitCalls`, or `rateLimit` in other libraries.

### Popular use cases

- Limiting the frequency of function calls in response to rapidly occurring events like scrolling, resizing, or key presses.
- Ensuring a function is not executed more than once within a specified time interval to optimize performance.
- Delaying execution of repeated function calls but allowing a final trailing call to execute after the last event in some cases.
- Useful for scenarios like logging, network requests, or animation triggers that shouldn't be triggered too frequently.

0 comments on commit 449601d

Please sign in to comment.