mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 08:11:24 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
8
apps/yaak-client/hooks/useDebouncedValue.ts
Normal file
8
apps/yaak-client/hooks/useDebouncedValue.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useDebouncedState } from './useDebouncedState';
|
||||
|
||||
export function useDebouncedValue<T>(value: T, delay = 500) {
|
||||
const [state, setState] = useDebouncedState<T>(value, delay);
|
||||
useEffect(() => setState(value), [setState, value]);
|
||||
return state;
|
||||
}
|
||||
Reference in New Issue
Block a user