Skip to content

Commit

Permalink
feat: pass arguments to memoized callback (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jivings authored and streamich committed Dec 19, 2018
1 parent 3c9a48e commit 88dd513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const useAsync = <T>(fn: () => Promise<T>, args?) => {

useEffect(() => {
let mounted = true;
const promise = memoized();
const promise = memoized.apply(this, args);

promise
.then(value => {
Expand Down

0 comments on commit 88dd513

Please sign in to comment.