Search
Ctrl + K
Returns true if the component is mounted
Source
Docs
Package
useMounted hook returns true if component is mounted and false if it's not.
useMounted
true
false
import { useMounted } from '@mantine/hooks'; function Demo() { const mounted = useMounted(); return ( <div> {mounted ? 'Component is mounted' : 'Component is not mounted'} </div> ); }
function useMounted(): boolean;
use-logger
use-shallow-effect