@types/create-react-class

  • Version 15.6.9
  • Published
  • 5.37 kB
  • 1 dependency
  • MIT license

Install

npm i @types/create-react-class
yarn add @types/create-react-class
pnpm add @types/create-react-class

Overview

TypeScript definitions for create-react-class

Index

Functions

function createReactClass

createReactClass: <P, S = {}>(
spec: createReactClass.ComponentSpec<P, S>
) => createReactClass.ClassicComponentClass<P>;

    Interfaces

    interface ClassicComponent

    interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {}

      method getInitialState

      getInitialState: () => S;

        method isMounted

        isMounted: () => boolean;

          method replaceState

          replaceState: (nextState: S, callback?: () => void) => void;

            interface ClassicComponentClass

            interface ClassicComponentClass<P = {}> extends Omit<ComponentClass<P>, 'new'> {}

              method getDefaultProps

              getDefaultProps: () => P;

                construct signature

                new (props: P, context?: any): ClassicComponent<P, any>;

                  interface ComponentSpec

                  interface ComponentSpec<P, S> extends Mixin<P, S> {}

                    method render

                    render: () => ReactNode;

                      index signature

                      [propertyName: string]: any;

                        interface Mixin

                        interface Mixin<P, S> extends ComponentLifecycle<P, S> {}

                          property displayName

                          displayName?: string | undefined;

                            property mixins

                            mixins?: Array<Mixin<P, S>> | undefined;

                              property propTypes

                              propTypes?: any;
                              • Ignored by React.

                                Deprecated

                                Only kept in types for backwards compatibility. Will be removed in a futre major release.

                              property statics

                              statics?:
                              | {
                              [key: string]: any;
                              }
                              | undefined;

                                method getDefaultProps

                                getDefaultProps: () => P;

                                  method getInitialState

                                  getInitialState: () => S;

                                    Package Files (1)

                                    Dependencies (1)

                                    Dev Dependencies (0)

                                    No dev dependencies.

                                    Peer Dependencies (0)

                                    No peer dependencies.

                                    Badge

                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/create-react-class.

                                    • Markdown
                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/create-react-class)
                                    • HTML
                                      <a href="https://www.jsdocs.io/package/@types/create-react-class"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>