Interface RefObject<T>

A readonly ref container where current cannot be mutated.

Created by createRef, or useRef when passed null.

Example

const ref = createRef<HTMLDivElement>();

ref.current = document.createElement('div'); // Error

Type Parameters

  • T

    The type of the ref's value.

Hierarchy

  • RefObject

Properties

Properties

current: null | T

The current value of the ref.

Generated using TypeDoc