Represents a portal view component.

Hierarchy (View Summary)

  • dayjs<IPortalViewProps>
    • PortalView

Constructors

Properties

Methods

Constructors

  • Returns PortalView

Properties

element: null | HTMLDivElement

Methods

  • Method componentWillUnmount

    This method is called when the component is about to be unmounted (removed) from the DOM. It performs clean-up tasks, if any, to avoid memory leaks or unwanted effects after the component is removed.

    This method checks if 'this.element' (assumed to be a DOM element) exists, and if so, removes it from the document body using 'document.body.removeChild()'. Finally, it sets 'this.element' to null to release any references to the removed element.

    Returns void

  • Renders the provided children into a portal, within a dynamically created div element appended to the document body.

    Returns ReactPortal

    • The resulting React element after rendering the children into the portal.