mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 08:41:37 +00:00
13 lines
224 B
TypeScript
13 lines
224 B
TypeScript
import { useEffect, useState } from 'react';
|
|
|
|
const useMounted = () => {
|
|
const [mounted, setMounted] = useState(false);
|
|
useEffect(() => setMounted(true), []);
|
|
|
|
return {
|
|
mounted,
|
|
};
|
|
};
|
|
|
|
export default useMounted;
|