Skip to content

Commit dffd39f

Browse files
committed
bring in latest typescript changes
1 parent 85ca6a3 commit dffd39f

File tree

2 files changed

+4
-231
lines changed

2 files changed

+4
-231
lines changed

packages/react-async/src/useAsync.js

Lines changed: 0 additions & 230 deletions
This file was deleted.

packages/react-async/src/useAsync.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ function useAsync<T extends {}>(
196196
/* eslint-disable react-hooks/exhaustive-deps */
197197
const { watch, watchFn } = options
198198
useEffect(() => {
199-
if (watchFn && lastOptions.current && watchFn(options, lastOptions.current)) load()
199+
if (watchFn && lastOptions.current && watchFn(options, lastOptions.current)) {
200+
lastOptions.current = options
201+
load()
202+
}
200203
})
201204
useEffect(() => {
202205
lastOptions.current = options

0 commit comments

Comments
 (0)