# Interface ClassicComponentClass<P>

#### Deprecated

Use `ClassicComponentClass` from `create-react-class`

#### See

- Legacy React Docs
- `create-react-class` on npm

interface ClassicComponentClass<P> {
new ClassicComponentClass new (props, deprecatedLegacyContext?): ClassicComponent<P, any>;
new ClassicComponentClass new (props, deprecatedLegacyContext?): Component<P, any, any>;
childContextTypes?: ValidationMap<any>;
contextType?: Context<any>;
contextTypes?: ValidationMap<any>;
defaultProps?: Partial<P>;
displayName?: string;
getDerivedStateFromError?: GetDerivedStateFromError<P, any>;
getDerivedStateFromProps?: GetDerivedStateFromProps<P, any>;
propTypes?: WeakValidationMap<P>;
getDefaultProps?(): P;
}

#### Type Parameters

- P = {}

#### Hierarchy (view full)

- ComponentClass<P>
  - ClassicComponentClass

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

#####
Index

### Constructors

constructor

### Properties

childContextTypes?
contextType?
contextTypes?
defaultProps?
displayName?
getDerivedStateFromError?
getDerivedStateFromProps?
propTypes?

### Methods

getDefaultProps?

## Constructors

### constructor

- new ClassicComponentClass(props, deprecatedLegacyContext?): ClassicComponent<P, any>

- #### Parameters

  - props: P
  - `Optional` deprecatedLegacyContext: any

  #### Returns ClassicComponent<P, any>

  Inherited from ComponentClass.constructor

  - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:1335
- new ClassicComponentClass(props, deprecatedLegacyContext?): Component<P, any, any>

- #### Parameters

  - props: P
  - `Optional` deprecatedLegacyContext: any

    #### Deprecated

    #### See

    React Docs

  #### Returns Component<P, any, any>

  Inherited from ComponentClass<P>.constructor

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

## Properties

### `Optional` childContextTypes

childContextTypes?: ValidationMap<any>

#### Deprecated

#### See

Legacy React Docs

Inherited from ComponentClass.childContextTypes

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

### `Optional` contextType

contextType?: Context<any>

Inherited from ComponentClass.contextType

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

### `Optional` contextTypes

contextTypes?: ValidationMap<any>

#### Deprecated

use ComponentClass.contextType instead

Lets you specify which legacy context is consumed by this component.

#### See

Legacy React Docs

Inherited from ComponentClass.contextTypes

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

### `Optional` defaultProps

defaultProps?: Partial<P>

Used to define default values for the props accepted by the component.

#### See

React Docs

Inherited from ComponentClass.defaultProps

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

### `Optional` displayName

displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.

#### See

Legacy React Docs

Inherited from ComponentClass.displayName

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

### `Optional` getDerivedStateFromError

getDerivedStateFromError?: GetDerivedStateFromError<P, any>

Inherited from ComponentClass.getDerivedStateFromError

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

### `Optional` getDerivedStateFromProps

getDerivedStateFromProps?: GetDerivedStateFromProps<P, any>

Inherited from ComponentClass.getDerivedStateFromProps

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

### `Optional` propTypes

propTypes?: WeakValidationMap<P>

Used to declare the types of the props accepted by the component. These types will be checked during rendering and in development only.

We recommend using TypeScript instead of checking prop types at runtime.

#### See

React Docs

Inherited from ComponentClass.propTypes

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

## Methods

### `Optional` getDefaultProps

- getDefaultProps(): P

- #### Returns P

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