useIsMounted
Custom hook that determines if the component is currently mounted.
Custom hook that determines if the component is currently mounted.
Usage
import { useIsMounted } from "@tilt-legal/cubitt-components/utilities/hooks";
const isComponentMounted = useIsMounted();
// Use isComponentMounted() to check if the component is currently mounted before performing certain actions.API
Signature
declare function useIsMounted(): () => boolean;Parameters
This hook takes no arguments.
Return Value
| Value | Type | Description |
|---|---|---|
return | () => boolean | A function that returns a boolean value indicating whether the component is mounted. |