Skip to content

Commit

Permalink
fix: remove attempt from deps of retry in useAsyncRetry (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy7259 authored and wardoost committed Sep 23, 2019
1 parent 24b614c commit adce59e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useAsyncRetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const useAsyncRetry = <T>(fn: () => Promise<T>, deps: DependencyList = []) => {
}

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

return { ...state, retry };
};
Expand Down

0 comments on commit adce59e

Please sign in to comment.