Skip to content

Commit

Permalink
fix: useMountedState should not change state on componentDidUpdate li…
Browse files Browse the repository at this point in the history
…fecycle
  • Loading branch information
WhiteMinds committed Sep 16, 2020
1 parent d45f038 commit 701b306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useMountedState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function useMountedState(): () => boolean {
return () => {
mountedRef.current = false;
};
});
}, []);

return get;
}

0 comments on commit 701b306

Please sign in to comment.