mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-07 06:42:39 +02:00
12 lines
199 B
TypeScript
12 lines
199 B
TypeScript
|
|
import * as React from 'react';
|
||
|
|
|
||
|
|
export function useMounted() {
|
||
|
|
const [mounted, setMounted] = React.useState(false);
|
||
|
|
|
||
|
|
React.useEffect(() => {
|
||
|
|
setMounted(true);
|
||
|
|
}, []);
|
||
|
|
|
||
|
|
return mounted;
|
||
|
|
}
|