Add hooks

This commit is contained in:
jeffvli
2022-12-11 01:19:18 -08:00
parent f392fbab83
commit 528a118239
3 changed files with 22 additions and 0 deletions
@@ -0,0 +1,11 @@
import { useEffect, useState } from 'react';
export const useIsMounted = () => {
const [isMounted, setIsMounted] = useState(false);
useEffect(() => {
setIsMounted(true);
}, []);
return isMounted;
};