diff --git a/src/useAsyncRetry.ts b/src/useAsyncRetry.ts index 18b54a3ced..0382df244f 100644 --- a/src/useAsyncRetry.ts +++ b/src/useAsyncRetry.ts @@ -3,7 +3,7 @@ import useAsync from './useAsync'; const useAsyncRetry = (fn: () => Promise, args: any[] = []) => { const [attempt, setAttempt] = useState(0); - const memoized = useCallback(async () => await fn(), [...args, attempt]); + const memoized = useCallback(() => fn(), [...args, attempt]); const state = useAsync(memoized); const retry = useCallback(() => {