Simple element reference which can be passed to a ref attribute on HTML elements.

Type Parameters

  • T extends HTMLElement = HTMLElement

Constructors

Methods

Constructors

  • Type Parameters

    • T extends HTMLElement = HTMLElement

    Returns Reference<T>

Methods

  • Returns null | T

    The referenced HTML element or null if not set yet.

  • Sets the referenced HTML element.

    Parameters

    • element: T

      The HTML element to set.

    Returns void