Represents the built-in attributes available to class components.

interface ClassAttributes<T> {
    key?: null | Key;
    ref?: LegacyRef<T>;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

Properties

key?: null | Key
ref?: LegacyRef<T>

Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).