mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 11:56:25 +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;
|
||
|
|
}
|