remove unused debounce callback deps
This commit is contained in:
parent
58c5844492
commit
dc1fda64dc
|
@ -20,6 +20,6 @@ export function debounce (fn, time) {
|
|||
export default function useDebounceCallback (fn, time, deps = []) {
|
||||
const [args, setArgs] = useState([])
|
||||
const memoFn = useCallback(fn, deps)
|
||||
useNoInitialEffect(debounce(() => memoFn(...args), time), [memoFn, time, args, ...deps])
|
||||
useNoInitialEffect(debounce(() => memoFn(...args), time), [memoFn, time, args])
|
||||
return useCallback((...args) => setArgs(args), [])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue