Skip to content

Commit 0ab3324

Browse files
committed
JSDocs for useDebounce
1 parent 857cce7 commit 0ab3324

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/webapp/app/hooks/useDebounce.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { useRef } from "react";
22

3-
//a function that you call with a debounce delay, the function will only be called after the delay has passed
3+
/**
4+
* A function that you call with a debounce delay, the function will only be called after the delay has passed
5+
*
6+
* @param fn The function to debounce
7+
* @param delay In ms
8+
*/
49
export function useDebounce<T extends (...args: any[]) => any>(fn: T, delay: number) {
510
const timeout = useRef<ReturnType<typeof setTimeout>>();
611

0 commit comments

Comments
 (0)