Skip to content

Commit adce59e

Browse files
zyy7259wardoost
authored andcommitted
fix: remove attempt from deps of retry in useAsyncRetry (#614)
1 parent 24b614c commit adce59e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useAsyncRetry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const useAsyncRetry = <T>(fn: () => Promise<T>, deps: DependencyList = []) => {
2020
}
2121

2222
setAttempt(currentAttempt => currentAttempt + 1);
23-
}, [...deps, stateLoading, attempt]);
23+
}, [...deps, stateLoading]);
2424

2525
return { ...state, retry };
2626
};

0 commit comments

Comments
 (0)