Skip to content

Commit

Permalink
fix: return from useUpdateEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Aug 19, 2019
2 parents 8700ad2 + 8b24df4 commit 2f70dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useUpdateEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useUpdateEffect: typeof useEffect = (effect, deps) => {
if (isInitialMount.current) {
isInitialMount.current = false;
} else {
effect();
return effect();
}
}, deps);
};
Expand Down

0 comments on commit 2f70dc2

Please sign in to comment.