diff options
| author | Matain <[email protected]> | 2022-06-12 23:38:31 +0800 |
|---|---|---|
| committer | Matain <[email protected]> | 2022-06-12 23:38:31 +0800 |
| commit | e4e921e0b93f74bf126ca80cbb83f5e912f73a88 (patch) | |
| tree | ca586f4753f5266ab67051235c7a79370fca1333 /src/hooks/useTextInput.ts | |
| parent | a825925cc97d95762634d234ef06be1627a21fb1 (diff) | |
| parent | ea5d7cf003eeef30cb7bbe789c6ba7f314bf1ce4 (diff) | |
Merge branch 'haishanh-master'
Diffstat (limited to 'src/hooks/useTextInput.ts')
| -rw-r--r-- | src/hooks/useTextInput.ts | 4 |
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); |
