Function useIsMounted

  • This function is a react hook for determining whether the consuming component is currently mounted on the DOM.

    Example

    import { useIsMounted } from '@oneblink/apps-react'

    const isMounted = useIsMounted()

    if (isMounted.current) {
    // DO SOMETHING HERE
    }

    Returns {
        current: boolean;
    }

    • current: boolean

      Whether the current component is mounted.