Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Disable ESLint warning about exhaustive-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyatasattva committed Apr 11, 2022
1 parent 47aeefb commit 051759e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/js/utils/useThrottle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function useThrottle< T extends ( ...args: unknown[] ) => unknown >(
cbRef.current = cb;
} );

// Disabling because we can't pass an arrow function in this case
// eslint-disable-next-line react-hooks/exhaustive-deps
const throttledCb = useCallback(
throttle( ( ...args ) => cbRef.current( ...args ), delay, options ),
[ delay ]
Expand Down

0 comments on commit 051759e

Please sign in to comment.