summaryrefslogtreecommitdiff
path: root/src/hooks/useTextInput.ts
diff options
context:
space:
mode:
authorMatain <[email protected]>2022-06-12 23:34:56 +0800
committerMatain <[email protected]>2022-06-12 23:34:56 +0800
commitea5d7cf003eeef30cb7bbe789c6ba7f314bf1ce4 (patch)
treebff1bd7b0e8e8eb753d373b57f007bbe97f96c76 /src/hooks/useTextInput.ts
parent4fd2c8f646e48dd0c07d0c2041de52e9a4f8bc82 (diff)
parent38571da24ac54137564be5e41b7a409009e2ee10 (diff)
Merge branch 'master' of https://github.com/haishanh/yacd into haishanh-master
Diffstat (limited to 'src/hooks/useTextInput.ts')
-rw-r--r--src/hooks/useTextInput.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/hooks/useTextInput.ts b/src/hooks/useTextInput.ts
index 1fa19f7..853044c 100644
--- a/src/hooks/useTextInput.ts
+++ b/src/hooks/useTextInput.ts
@@ -9,9 +9,7 @@ export function useTextInut(
): [(e: React.ChangeEvent<HTMLInputElement>) => void, string] {
const [, setTextGlobal] = useRecoilState(x);
const [text, setText] = useState('');
- const setTextDebounced = useMemo(() => debounce(setTextGlobal, 300), [
- setTextGlobal,
- ]);
+ const setTextDebounced = useMemo(() => debounce(setTextGlobal, 300), [setTextGlobal]);
const onChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
setText(e.target.value);