refactor more hooks

This commit is contained in:
2022-07-25 13:11:40 -04:00
parent 37feb305ff
commit cf106e46da
18 changed files with 246 additions and 296 deletions
+15
View File
@@ -0,0 +1,15 @@
import { useRef } from "react";
const useFirstMountState = (): boolean => {
const isFirstMount = useRef(true);
if (isFirstMount.current) {
isFirstMount.current = false;
return true;
}
return isFirstMount.current;
};
export default useFirstMountState;