Reference

@reckona/mreact-dom

30 public exports.

Function

FunctioncreatePortalfunction createPortal(children: ReactCompatNode, container: Element, key?: unknown): ReactCompatPortalRe-exports the React DOM rendering helpers exposed by the root entrypoint.FunctioncreateRootfunction createRoot(container: Element, options?: RootOptions): RootRe-exports the React DOM rendering helpers exposed by the root entrypoint.FunctionflushSyncfunction flushSync<T>(callback: (): T): TRe-exports the React DOM rendering helpers exposed by the root entrypoint.FunctionhydrateRootfunction hydrateRoot(container: Element, element: ReactCompatNode, options?: HydrateRootOptions): RootRe-exports the React DOM rendering helpers exposed by the root entrypoint.Functionpreconnectfunction preconnect(href: string, options: PreconnectOptions): voidInserts a preconnect link for the provided origin if it is not already present.FunctionprefetchDNSfunction prefetchDNS(href: string): voidInserts a dns-prefetch link for the provided host if it is not already present.Functionpreinitfunction preinit(href: string, options: PreinitOptions): voidPreinitializes a script or stylesheet resource in the document head.FunctionpreinitModulefunction preinitModule(href: string, options: PreinitModuleOptions): voidPreinitializes a JavaScript module resource in the document head.Functionpreloadfunction preload(href: string, options: PreloadOptions): voidInserts a preload link for the provided resource if it is not already present.FunctionpreloadModulefunction preloadModule(href: string, options: PreloadModuleOptions): voidInserts a modulepreload link for the provided module if it is not already present.Functionrenderfunction render(element: ReactCompatNode, container: Element): voidRe-exports the React DOM rendering helpers exposed by the root entrypoint.FunctionrequestFormResetfunction requestFormReset(form: HTMLFormElement): voidResets a form element after a server action-style submission completes.FunctionunmountComponentAtNodefunction unmountComponentAtNode(container: Element): booleanRe-exports the React DOM rendering helpers exposed by the root entrypoint.Functionunstable_batchedUpdatesfunction unstable_batchedUpdates<T>(callback: (): T): T function unstable_batchedUpdates<TArgument, TResult>(callback: (argument: TArgument): TResult, argument: TArgument): TResultRuns a callback at discrete event priority and returns its result.FunctionuseFormStatefunction useFormState<TState, TPayload>(action: (previousState: TState, payload: TPayload): TState | Promise<TState>, initialState: TState): [TState, (payload: TPayload): void, boolean]Re-exports the React DOM rendering helpers exposed by the root entrypoint.FunctionuseFormStatusfunction useFormStatus(): FormStatusReturns the current form submission status for the nearest form action.

Interface

InterfaceFormStatusNotPendinginterface FormStatusNotPendingIdle form status returned when no form submission is pending.InterfaceFormStatusPendinginterface FormStatusPendingPending form status returned while a submission is in progress.InterfaceHydrateRootOptionsinterface HydrateRootOptionsOptions used when hydrating server-rendered markup.InterfacePreconnectOptionsinterface PreconnectOptionsOptions applied when inserting a preconnect resource hint.InterfacePreinitModuleOptionsinterface PreinitModuleOptionsOptions applied when preinitializing a JavaScript module resource.InterfacePreinitOptionsinterface PreinitOptionsOptions applied when preinitializing a script or stylesheet resource.InterfacePreloadModuleOptionsinterface PreloadModuleOptionsOptions applied when inserting a modulepreload resource hint.InterfacePreloadOptionsinterface PreloadOptionsOptions applied when inserting a preload resource hint.InterfaceRootinterface RootRoot controller returned by createRoot and hydrateRoot.InterfaceRootOptionsinterface RootOptionsOptions used when creating a client render root.

Type Alias

Type AliasFormStatustype FormStatus = FormStatusPending | FormStatusNotPendingCurrent form submission state returned by useFormStatus.Type AliasPreloadAstype PreloadAs = "audio" | "document" | "embed" | "fetch" | "font" | "image" | "object" | "track" | "script" | "style" | "video" | "worker"Allowed destination values for preload resource hints.

Variable

Variabledefaultconst default: { createPortal: (children: ReactCompatNode, container: Element, key?: unknown): ReactCompatPortal; createRoot: (container: Element, options?: RootOptions): Root; flushSync: <T>(callback: (): T): T; hydrateRoot: (container: Element, element: ReactCompatNode, options?: HydrateRootOptions): Root; preconnect: (href: string, options: PreconnectOptions): void; prefetchDNS: (href: string): void; preinit: (href: string, options: PreinitOptions): void; preinitModule: (href: string, options: PreinitModuleOptions): void; ... }React DOM-compatible default export object.Variableversionconst version: "19.2.6"React DOM-compatible package version.