mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-25 04:44:12 +02:00
Split codebase (#455)
This commit is contained in:
@@ -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