@types/react-dom

  • Version 19.2.4
  • Published
  • 30.3 kB
  • No dependencies
  • MIT license

Install

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

Overview

TypeScript definitions for react-dom

Index

Variables

variable version

const version: string;

    Functions

    function browser

    browser: () => BrowserUsable;

      function createPortal

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

        function flushSync

        flushSync: <R>(fn: () => R) => R;

          function preconnect

          preconnect: (href: string, options?: PreconnectOptions) => void;

            function prefetchDNS

            prefetchDNS: (href: string) => void;

              function preinit

              preinit: (href: string, options?: PreinitOptions) => void;

                function preinitModule

                preinitModule: (href: string, options?: PreinitModuleOptions) => void;

                  function preload

                  preload: (href: string, options?: PreloadOptions) => void;

                    function preloadModule

                    preloadModule: (href: string, options?: PreloadModuleOptions) => void;

                      function requestFormReset

                      requestFormReset: (form: HTMLFormElement) => void;

                        function unstable_batchedUpdates

                        unstable_batchedUpdates: {
                        <A, R>(callback: (a: A) => R, a: A): R;
                        <R>(callback: () => R): R;
                        };

                          function useFormState

                          useFormState: {
                          <State>(
                          action: (state: Awaited<State>) => State | Promise<State>,
                          initialState: Awaited<State>,
                          permalink?: string
                          ): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
                          <State, Payload>(
                          action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
                          initialState: Awaited<State>,
                          permalink?: string
                          ): [
                          state: Awaited<State>,
                          dispatch: (payload: Payload) => void,
                          isPending: boolean
                          ];
                          };

                            function useFormStatus

                            useFormStatus: () => FormStatus;

                              Interfaces

                              interface FormStatusNotPending

                              interface FormStatusNotPending {}

                                property action

                                action: null;

                                  property data

                                  data: null;

                                    property method

                                    method: null;

                                      property pending

                                      pending: false;

                                        interface FormStatusPending

                                        interface FormStatusPending {}

                                          property action

                                          action: string | ((formData: FormData) => void | Promise<void>);

                                            property data

                                            data: FormData;

                                              property method

                                              method: string;

                                                property pending

                                                pending: true;

                                                  interface PreconnectOptions

                                                  interface PreconnectOptions {}

                                                    property crossOrigin

                                                    crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined;

                                                      interface PreinitModuleOptions

                                                      interface PreinitModuleOptions {}

                                                        property as

                                                        as?: PreinitModuleAs;
                                                        • "script"

                                                        property crossOrigin

                                                        crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined;

                                                          property integrity

                                                          integrity?: string | undefined;

                                                            property nonce

                                                            nonce?: string | undefined;

                                                              interface PreinitOptions

                                                              interface PreinitOptions {}

                                                                property as

                                                                as: PreinitAs;

                                                                  property crossOrigin

                                                                  crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined;

                                                                    property fetchPriority

                                                                    fetchPriority?: 'high' | 'low' | 'auto' | undefined;

                                                                      property integrity

                                                                      integrity?: string | undefined;

                                                                        property nonce

                                                                        nonce?: string | undefined;

                                                                          property precedence

                                                                          precedence?: string | undefined;

                                                                            interface PreloadModuleOptions

                                                                            interface PreloadModuleOptions {}

                                                                              property as

                                                                              as: PreloadModuleAs;
                                                                              • "script"

                                                                              property crossOrigin

                                                                              crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined;

                                                                                property integrity

                                                                                integrity?: string | undefined;

                                                                                  property nonce

                                                                                  nonce?: string | undefined;

                                                                                    interface PreloadOptions

                                                                                    interface PreloadOptions {}

                                                                                      property as

                                                                                      as: PreloadAs;

                                                                                        property crossOrigin

                                                                                        crossOrigin?: 'anonymous' | 'use-credentials' | '' | undefined;

                                                                                          property fetchPriority

                                                                                          fetchPriority?: 'high' | 'low' | 'auto' | undefined;

                                                                                            property imageSizes

                                                                                            imageSizes?: string | undefined;

                                                                                              property imageSrcSet

                                                                                              imageSrcSet?: string | undefined;

                                                                                                property integrity

                                                                                                integrity?: string | undefined;

                                                                                                  property media

                                                                                                  media?: string | undefined;

                                                                                                    property nonce

                                                                                                    nonce?: string | undefined;

                                                                                                      property referrerPolicy

                                                                                                      referrerPolicy?: ReferrerPolicy | undefined;

                                                                                                        property type

                                                                                                        type?: string | undefined;

                                                                                                          Type Aliases

                                                                                                          type FormStatus

                                                                                                          type FormStatus = FormStatusPending | FormStatusNotPending;

                                                                                                            type PreinitAs

                                                                                                            type PreinitAs = 'script' | 'style';

                                                                                                              type PreinitModuleAs

                                                                                                              type PreinitModuleAs = 'script';

                                                                                                                type PreloadAs

                                                                                                                type PreloadAs =
                                                                                                                | 'audio'
                                                                                                                | 'document'
                                                                                                                | 'embed'
                                                                                                                | 'fetch'
                                                                                                                | 'font'
                                                                                                                | 'image'
                                                                                                                | 'object'
                                                                                                                | 'track'
                                                                                                                | 'script'
                                                                                                                | 'style'
                                                                                                                | 'video'
                                                                                                                | 'worker';

                                                                                                                  type PreloadModuleAs

                                                                                                                  type PreloadModuleAs = RequestDestination;

                                                                                                                    Package Files (2)

                                                                                                                    Dependencies (0)

                                                                                                                    No dependencies.

                                                                                                                    Dev Dependencies (0)

                                                                                                                    No dev dependencies.

                                                                                                                    Peer Dependencies (1)

                                                                                                                    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>