@types/react-dom

  • Version 17.0.6
  • Published
  • 23.7 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: any, container: Element, key?: null | string) => any;

          function createRoot

          createRoot: (
          container: Element | Document | DocumentFragment | Comment,
          options?: RootOptions
          ) => Root;
          • Replaces ReactDOM.render when the .render method is called and enables Concurrent Mode.

            See Also

            • https://reactjs.org/docs/concurrent-mode-reference.html#createroot

          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_flushControlled

                  unstable_flushControlled: (callback: () => void) => void;

                    function unstable_renderSubtreeIntoContainer

                    unstable_renderSubtreeIntoContainer: {
                    <T extends Element>(
                    parentComponent: any,
                    element: any,
                    container: Element,
                    callback?: (element: T) => any
                    ): T;
                    <P, T extends any>(
                    parentComponent: any,
                    element: any,
                    container: Element,
                    callback?: (component: T) => any
                    ): T;
                    <P>(
                    parentComponent: any,
                    element: any,
                    container: Element,
                    callback?: (component?: any) => any
                    ): any;
                    };

                      function unstable_scheduleHydration

                      unstable_scheduleHydration: (
                      target: Element | Document | DocumentFragment | Comment
                      ) => void;
                      • See Also

                        • https://github.com/facebook/react/commit/3a2b5f148d450c69aab67f055fc441d294c23518

                      Interfaces

                      interface HydrationOptions

                      interface HydrationOptions {}

                        method onDeleted

                        onDeleted: (suspenseInstance: Comment) => void;

                          method onHydrated

                          onHydrated: (suspenseInstance: Comment) => void;

                            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: SFCElement<any> | Array<SFCElement<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;

                                            interface Root

                                            interface Root {}

                                              method render

                                              render: (
                                              children: React.ReactChild | React.ReactNodeArray,
                                              callback?: () => void
                                              ) => void;

                                                method unmount

                                                unmount: (callback?: () => void) => void;

                                                  interface RootOptions

                                                  interface RootOptions {}

                                                    property hydrate

                                                    hydrate?: boolean;

                                                      property hydrationOptions

                                                      hydrationOptions?: HydrationOptions;

                                                        Type Aliases

                                                        type Container

                                                        type Container = Element | Document | DocumentFragment;

                                                          Package Files (2)

                                                          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>