Skip to content

Commit

Permalink
fix(useRefMounted): only run and cleanup once
Browse files Browse the repository at this point in the history
  • Loading branch information
Flydiverny authored Apr 29, 2019
1 parent 61f8f51 commit 6a651be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useRefMounted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const useRefMounted = (): RefObject<boolean> => {
return () => {
refMounted.current = false;
};
});
}, []);

return refMounted;
};
Expand Down

0 comments on commit 6a651be

Please sign in to comment.