We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85ca6a3 commit dffd39fCopy full SHA for dffd39f
packages/react-async/src/useAsync.js
packages/react-async/src/useAsync.tsx
@@ -196,7 +196,10 @@ function useAsync<T extends {}>(
196
/* eslint-disable react-hooks/exhaustive-deps */
197
const { watch, watchFn } = options
198
useEffect(() => {
199
- if (watchFn && lastOptions.current && watchFn(options, lastOptions.current)) load()
+ if (watchFn && lastOptions.current && watchFn(options, lastOptions.current)) {
200
+ lastOptions.current = options
201
+ load()
202
+ }
203
})
204
205
lastOptions.current = options
0 commit comments