Skip to content

Commit 48d51de

Browse files
committed
No need to update options ref when they haven't changed.
1 parent ab66796 commit 48d51de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-async/src/useAsync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const useAsync = (arg1, arg2) => {
130130
})
131131
useEffect(() => {
132132
lastOptions.current = options
133-
})
133+
}, [options])
134134
useEffect(() => {
135135
if (counter.current) cancel()
136136
if (promise || promiseFn) load()

0 commit comments

Comments
 (0)