Skip to content

Commit

Permalink
fix: useUpdateEffect add return
Browse files Browse the repository at this point in the history
  • Loading branch information
brickspert committed Aug 19, 2019
1 parent 1d5cd10 commit 8b24df4
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 8b24df4

Please sign in to comment.