fix: sync bug

This commit is contained in:
Gabe
2025-11-15 21:05:06 +08:00
parent 4f00492e49
commit c4ccdba268
5 changed files with 31 additions and 10 deletions

View File

@@ -13,5 +13,11 @@ export function useDebouncedCallback(callback, delay) {
[delay]
);
useEffect(() => {
return () => {
debouncedCallback.cancel();
};
}, [debouncedCallback]);
return debouncedCallback;
}