mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-26 18:58:17 +00:00
1.7 KiB
1.7 KiB
title
| title |
|---|
| React DOM APIs |
The react-dom package contains methods that are only supported for the web applications (which run in the browser DOM environment). They are not supported for React Native.
APIs {/apis/}
These APIs can be imported from your components. They are rarely used:
createPortallets you render child components in a different part of the DOM tree.flushSynclets you force React to flush a state update and update the DOM synchronously.
Entry points {/entry-points/}
The react-dom package provides two additional entry points:
react-dom/clientcontains APIs to render React components on the client (in the browser).react-dom/servercontains APIs to render React components on the server.
Deprecated APIs {/deprecated-apis/}
These APIs will be removed in a future major version of React.
findDOMNodefinds the closest DOM node corresponding to a class component instance.hydratemounts a tree into the DOM created from server HTML. Deprecated in favor ofhydrateRoot.rendermounts a tree into the DOM. Deprecated in favor ofcreateRoot.unmountComponentAtNodeunmounts a tree from the DOM. Deprecated in favor ofroot.unmount().