Skip to content

Commit

Permalink
Update useThrottledCallback.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt authored Nov 23, 2023
1 parent 71e1e81 commit 0dff362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/useThrottledCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import useDebouncedCallback, {
* window.addEventListener('scroll', scrollHandler)
*
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
* const throttledRenewToken = useThrottledCallback(renewToken, 300000, { 'trailing': false })
* <button onClick={throttledRenewToken}>click</button>
* const throttled = useThrottledCallback(renewToken, 300000, { 'trailing': false })
* <button onClick={throttled}>click</button>
*
* // Cancel the trailing throttled invocation.
* window.addEventListener('popstate', throttled.cancel);
Expand Down

0 comments on commit 0dff362

Please sign in to comment.