@types/react-dom

  • Version 18.0.6
  • Published
  • 28 kB
  • 1 dependency
  • MIT license

Install

npm i @types/react-dom
yarn add @types/react-dom
pnpm add @types/react-dom

Overview

TypeScript definitions for React (react-dom)

Index

Variables

variable hydrate

const hydrate: Renderer;

    variable render

    const render: Renderer;

      variable version

      const version: string;

        Functions

        function createPortal

        createPortal: (
        children: ReactNode,
        container: Element | DocumentFragment,
        key?: null | string
        ) => ReactPortal;

          function findDOMNode

          findDOMNode: (
          instance: ReactInstance | null | undefined
          ) => Element | null | Text;

            function flushSync

            flushSync: { <R>(fn: () => R): R; <A, R>(fn: (a: A) => R, a: A): R };

              function unmountComponentAtNode

              unmountComponentAtNode: (container: Element | DocumentFragment) => boolean;

                function unstable_batchedUpdates

                unstable_batchedUpdates: {
                <A, B>(callback: (a: A, b: B) => any, a: A, b: B): void;
                <A>(callback: (a: A) => any, a: A): void;
                (callback: () => any): void;
                };

                  function unstable_renderSubtreeIntoContainer

                  unstable_renderSubtreeIntoContainer: {
                  <T extends Element>(
                  parentComponent: Component<any>,
                  element: DOMElement<DOMAttributes<T>, T>,
                  container: Element,
                  callback?: (element: T) => any
                  ): T;
                  <P, T extends Component<P, ComponentState>>(
                  parentComponent: Component<any>,
                  element: CElement<P, T>,
                  container: Element,
                  callback?: (component: T) => any
                  ): T;
                  <P>(
                  parentComponent: Component<any>,
                  element: ReactElement<P>,
                  container: Element,
                  callback?: (component?: any) => any
                  ): any;
                  };

                    Interfaces

                    interface Renderer

                    interface Renderer {}

                      call signature

                      <T extends Element>(
                      element: DOMElement<DOMAttributes<T>, T>,
                      container: Container | null,
                      callback?: () => void
                      ): T;

                        call signature

                        (
                        element: Array<DOMElement<DOMAttributes<any>, any>>,
                        container: Container | null,
                        callback?: () => void
                        ): Element;

                          call signature

                          (
                          element:
                          | FunctionComponentElement<any>
                          | Array<FunctionComponentElement<any>>,
                          container: Container | null,
                          callback?: () => void
                          ): void;

                            call signature

                            <P, T extends Component<P, ComponentState>>(
                            element: CElement<P, T>,
                            container: Container | null,
                            callback?: () => void
                            ): T;

                              call signature

                              (
                              element: Array<CElement<any, Component<any, ComponentState>>>,
                              container: Container | null,
                              callback?: () => void
                              ): Component<any, ComponentState>;

                                call signature

                                <P>(
                                element: ReactElement<P>,
                                container: Container | null,
                                callback?: () => void
                                ): Component<P, ComponentState> | Element | void;

                                  call signature

                                  (element: ReactElement[], container: Container | null, callback?: () => void):
                                  | Component<any, ComponentState>
                                  | Element
                                  | void;

                                    Type Aliases

                                    type Container

                                    type Container = Element | Document | DocumentFragment;

                                      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/react-dom.

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