# Interface ClassAttributes<T>

Represents the built-in attributes available to class components.

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

#### Type Parameters

- T

#### Hierarchy (view full)

- RefAttributes<T>
  - ClassAttributes
    - HTMLProps
    - SVGProps

- Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:309

#####
Index

### Properties

key?
ref?

## Properties

### `Optional` key

key?: Key

Inherited from RefAttributes.key

- Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:261

### `Optional` ref

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).

#### See

React Docs

Inherited from RefAttributes.ref

- Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:303