Function useIsVisible

Hook to check if an element is visible in the viewport.

  • Parameters

    • ref: MutableRefObject<any>

      The reference to the element.

    Returns boolean

    A boolean indicating if the element is visible.