mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
12 lines
226 B
TypeScript
12 lines
226 B
TypeScript
import { useEffect, useState } from 'react';
|
|
|
|
export const useIsMounted = () => {
|
|
const [isMounted, setIsMounted] = useState(false);
|
|
|
|
useEffect(() => {
|
|
setIsMounted(true);
|
|
}, []);
|
|
|
|
return isMounted;
|
|
};
|