Skip to content

Commit

Permalink
fix(use-debounce): format
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinh Trinh committed Nov 30, 2024
1 parent 0998954 commit 3a54b73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/use-debounce/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './use-debounce'
export * from './use-debounce'
6 changes: 3 additions & 3 deletions packages/use-debounce/src/use-debounce.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState } from "react";
import { useEffect, useRef, useState } from 'react'

export function useDebounce<T>(state: T, timeout: number = 3_00) : T {
export function useDebounce<T>(state: T, timeout: number = 3_00): T {
const [debounced, setDebounced] = useState<T>()
const timeoutId = useRef<number>()

Expand All @@ -20,4 +20,4 @@ export function useDebounce<T>(state: T, timeout: number = 3_00) : T {
}, [state, timeout])

return debounced as T
}
}

0 comments on commit 3a54b73

Please sign in to comment.