Skip to content

Commit 2f70dc2

Browse files
authored
fix: return from useUpdateEffect
2 parents 8700ad2 + 8b24df4 commit 2f70dc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useUpdateEffect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const useUpdateEffect: typeof useEffect = (effect, deps) => {
77
if (isInitialMount.current) {
88
isInitialMount.current = false;
99
} else {
10-
effect();
10+
return effect();
1111
}
1212
}, deps);
1313
};

0 commit comments

Comments
 (0)