Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const useDidUpdate = () => {
- const isNotMounted = useRef(true);
- useEffect(() => {
- if (isNotMounted.current) {
- isNotMounted.current = false;
- }
- });
- return !isNotMounted.current;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement