We want to hear from you!Take our 2021 Community Survey!
Support Ukraine ๐Ÿ‡บ๐Ÿ‡ฆ Help Provide Humanitarian Aid to Ukraine.

ReactDOM

<<<<<<< HEAD ืื ืืชื ื˜ื•ืขื ื™ื ืืช React ืžืชื’ื™ืช <script>, ื”-APIs ืžื”ืจืžื” ื”ืขืœื™ื•ื ื” ื”ื‘ืื™ื ื–ืžื™ื ื™ื ืชื—ืช ื”ืžืฉืชื ื” ื”ื’ืœื•ื‘ืœื™ ReactDOM. ืื ืืชื ืžืฉืชืžืฉื™ื ื‘-ES6 ืขื npm, ืืชื ื™ื›ื•ืœื™ื ืœื›ืชื•ื‘ import ReactDOM from 'react-dom'. ืื ืืชื ืžืฉืชืžืฉื™ื ื‘-ES5 ืขื npm, ืชื•ื›ืœื• ืœื›ืชื•ื‘ var ReactDOM = require('react-dom'). ======= The react-dom package provides DOM-specific methods that can be used at the top level of your app and as an escape hatch to get outside the React model if you need to.

import * as ReactDOM from 'react-dom';

If you use ES5 with npm, you can write:

var ReactDOM = require('react-dom');

The react-dom package also provides modules specific to client and server apps:

ืกืงื™ืจื” ื›ืœืœื™ืช

<<<<<<< HEAD ื”ื—ื‘ื™ืœื” react-dom ืžืกืคืงืช ืžืชื•ื“ื•ืช ืกืคืฆื™ืคื™ื•ืช ืœ-DOM ืฉื ื™ืชืŸ ืœื”ืฉืชืžืฉ ื‘ื”ืŸ ื‘ืจืžื” ื”ืขืœื™ื•ื ื” ืฉืœ ื”ืืคืœื™ืงืฆื™ื” ืฉืœื›ื ื•ื›ืคืชื— ืžื™ืœื•ื˜ ื›ื“ื™ ืœื”ื’ื™ืข ืืœ ืžื—ื•ืฅ ืœืžื•ื“ืœ React ืื ื™ืฉ ืœื›ื ืฆื•ืจืš ื‘ื›ืš. ืœืจื•ื‘ ื”ืงื•ืžืคื•ื ื ื˜ื•ืช ืฉืœื›ื ืœื ืืžื•ืจ ืœื”ื™ื•ืช ืฆื•ืจืš ืœื”ืฉืชืžืฉ ื‘ืžื•ื“ื•ืœ ื–ื”. ======= The react-dom package exports these methods:

These react-dom methods are also exported, but are considered legacy:

Note:

Both render and hydrate have been replaced with new client methods in React 18. These methods will warn that your app will behave as if itโ€™s running React 17 (learn more here).

ืชืžื™ื›ื” ื‘ื“ืคื“ืคื ื™ื

<<<<<<< HEAD React ืชื•ืžื›ืช ื‘ื›ืœ ื”ื“ืคื“ืคื ื™ื ื”ืคื•ืคื•ืœืจื™ื™ื, ื›ื•ืœืœ Internet Explorer 9 ื•ืžืขืœื”, ืื ื›ื™ ื›ืžื” polyfills ื ื“ืจืฉื™ื ืขื‘ื•ืจ ื“ืคื“ืคื ื™ื ื™ืฉื ื™ื ื™ื•ืชืจ ื›ื’ื•ืŸ IE 9 ื•-IE 10. ======= React supports all modern browsers, although some polyfills are required for older versions.

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b

ื”ืขืจื”

<<<<<<< HEAD ืื ื• ืœื ืชื•ืžื›ื™ื ื‘ื“ืคื“ืคื ื™ื ื™ืฉื ื™ื ื™ื•ืชืจ ืฉืื™ื ื ืชื•ืžื›ื™ื ื‘ืžืชื•ื“ื•ืช ES5, ืืš ื™ื™ืชื›ืŸ ืฉืชื’ืœื• ืฉื”ืืคืœื™ืงืฆื™ื•ืช ืฉืœื›ื ืคื•ืขืœื•ืช ื‘ื“ืคื“ืคื ื™ื ื™ืฉื ื™ื ื™ื•ืชืจ ืื ืชื›ืœืœื• ื‘ืขืžื•ื“ polyfills ื›ื’ื•ืŸ es5-shim ื•- es5-sham. ืืชื ืœื‘ื“ื›ื ื‘ืžืขืจื›ื” ืื ืชื‘ื—ืจื• ืœืงื—ืช ืืช ื”ื ืชื™ื‘ ื”ื–ื”.


=======

We do not support older browsers that donโ€™t support ES5 methods or microtasks such as Internet Explorer. You may find that your apps do work in older browsers if polyfills such as es5-shim and es5-sham are included in the page, but youโ€™re on your own if you choose to take this path.

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b

ืกื™ืžื•ื›ื™ืŸ

createPortal()

createPortal(child, container)

<<<<<<< HEAD ืžืจื ื“ืจืช ืืœืžื ื˜ื™ React ืœืชื•ืš ื”-DOM ื‘-container ืฉืกื•ืคืง ื•ืžื—ื–ื™ืจื” ื”ืคื ื™ื™ื” (reference) ืœืงื•ืžืคื•ื ื ื˜ื” (ืื• ืžื—ื–ื™ืจื” null ืขื‘ื•ืจ ืงื•ืžืคื•ื ื ื˜ื•ืช ื—ืกืจื•ืช state). ======= Creates a portal. Portals provide a way to render children into a DOM node that exists outside the hierarchy of the DOM component.

flushSync()

flushSync(callback)

Force React to flush any updates inside the provided callback synchronously. This ensures that the DOM is updated immediately.

// Force this state update to be synchronous.
flushSync(() => {
  setCount(count + 1);
});
// By this point, DOM is updated.

Note:

flushSync can significantly hurt performance. Use sparingly.

flushSync may force pending Suspense boundaries to show their fallback state.

flushSync may also run pending effects and synchronously apply any updates they contain before returning.

flushSync may also flush updates outside the callback when necessary to flush the updates inside the callback. For example, if there are pending updates from a click, React may flush those before flushing the updates inside the callback.

Legacy Reference

render()

render(element, container[, callback])

Note:

render has been replaced with createRoot in React 18. See createRoot for more info.

Render a React element into the DOM in the supplied container and return a reference to the component (or returns null for stateless components).

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b

ืื ืงื•ืžืคื•ื ื ื˜ืช ื”-React ืจื•ื ื“ืจื” ืงื•ื“ื ืœื›ืŸ ืœ-container, ืคืขื•ืœื” ื–ื• ืชื‘ืฆืข ืขื“ื›ื•ืŸ ืขื‘ื•ืจื” ื•ืจืง ืชืฉื ื” ืืช ื”-DOM ืœืคื™ ื”ืฆื•ืจืš ื›ื“ื™ ืœืฉืงืฃ ืืช ืืœืžื ื˜ ื”-React ื”ืื—ืจื•ืŸ.

ืื ืืจื’ื•ืžื ื˜ ื”-callback ื”ืื•ืคืฆื™ื•ื ืœื™ ืžืกื•ืคืง, ื”ื•ื ื™ื•ืจืฅ ืœืื—ืจ ืฉื”ืงื•ืžืคื•ื ื ื˜ื” ืจื•ื ื“ืจื” ืื• ืขื•ื“ื›ื ื”.

ื”ืขืจื”:

<<<<<<< HEAD ReactDOM.render() ืฉื•ืœื˜ืช ื‘ืชื•ื›ืŸ ืฉืœ ื”ืฆื•ืžืช ื”ืžื›ื™ืœ ืฉืืชื ืžืขื‘ื™ืจื™ื. ื›ืœ ืืœืžื ื˜ื™ ื”-DOM ื”ืงื™ื™ืžื™ื ื‘ืชื•ื›ื• ืžื•ื—ืœืคื™ื ื‘ืงืจื™ืื” ื”ืจืืฉื•ื ื”. ืงืจื™ืื•ืช ืžืื•ื—ืจื•ืช ื™ื•ืชืจ ืžืฉืชืžืฉื•ืช ื‘ืืœื’ื•ืจื™ืชื ื”ื‘ื“ืœืช ื”-DOM ืฉืœ React ืœื‘ื™ืฆื•ืข ืขื“ื›ื•ื ื™ื ื™ืขื™ืœื™ื.

ReactDOM.render() ืœื ืžืฉื ื” ืืช ื”ืฆื•ืžืช ื”ืžื›ื™ืœ (ืจืง ืžืฉื ื” ืืช ื”ื™ืœื“ื™ื ืฉืœ ื”ืžื›ื™ืœ). ื™ื™ืชื›ืŸ ืฉื™ื”ื™ื” ืืคืฉืจ ืœื”ื›ื ื™ืก ืงื•ืžืคื•ื ื ื˜ื” ืœืฆื•ืžืช DOM ืงื™ื™ื ืžื‘ืœื™ ืœื“ืจื•ืก ืืช ื”ื™ืœื“ื™ื ื”ืงื™ื™ืžื™ื.

ื”ืคื ื™ื™ื” ืœ-callback ืœืืœืžื ื˜ ื”ืฉื•ืจืฉ.

ืฉื™ืžื•ืฉ ื‘-ReactDOM.render() ื›ื“ื™ ืœื ืงื•ืช ืชื•ื›ืŸ ืืœืžื ื˜ ืฉื ืฉืœื— ืขืœ-ื™ื“ื™ ื”ืฉืจืช ื”ื•ืฆื ืžืฉื™ืžื•ืฉ ื•ื”ืืคืฉืจื•ืช ืชื•ืกืจ ื‘-React 17. ื”ืฉืชืžืฉื• ื‘-hydrate() ื‘ืžืงื•ื.

render() controls the contents of the container node you pass in. Any existing DOM elements inside are replaced when first called. Later calls use Reactโ€™s DOM diffing algorithm for efficient updates.

render() does not modify the container node (only modifies the children of the container). It may be possible to insert a component to an existing DOM node without overwriting the existing children.

render() currently returns a reference to the root ReactComponent instance. However, using this return value is legacy and should be avoided because future versions of React may render components asynchronously in some cases. If you need a reference to the root ReactComponent instance, the preferred solution is to attach a callback ref to the root element.

Using render() to hydrate a server-rendered container is deprecated. Use hydrateRoot() instead.

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b


hydrate()

hydrate(element, container[, callback])

<<<<<<< HEAD ื›ืžื• render(), ืื‘ืœ ืžืฉืžืฉืช ืœื ื™ืงื•ื™ ืฉืœ ืฆื•ืžืช ืžื›ื™ืœ ืฉืชื•ื›ืŸ ื”-HTML ืฉืœื• ืจื•ื ื“ืจ ืขืœ-ื™ื“ื™ ReactDOMServer. React ืชื ืกื” ืœืฆืจืฃ ืžื ื”ืœื™ ืื™ืจื•ืขื™ื ืœ-markup ื”ืงื™ื™ื. =======

Note:

hydrate has been replaced with hydrateRoot in React 18. See hydrateRoot for more info.

Same as render(), but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer. React will attempt to attach event listeners to the existing markup.

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b

React ืžืฆืคื” ืฉื”ืชื•ื›ืŸ ื”ืžืจื•ื ื“ืจ ื™ื”ื™ื” ื–ื”ื” ื‘ื™ืŸ ื”ืฉืจืช ืœื‘ื™ืŸ ื”ืœืงื•ื—. ื”ื™ื ื™ื›ื•ืœื” ืœืชืงืŸ ืืช ื”ื”ื‘ื“ืœื™ื ื‘ืชื•ื›ืŸ ื˜ืงืกื˜, ืื‘ืœ ืืชื ืฆืจื™ื›ื™ื ืœื˜ืคืœ ื‘ืื™-ื”ืชืืžื•ืช ื›ืคื™ ืฉืืชื ืžื˜ืคืœื™ื ื‘ื‘ืื’ื™ื ื•ืœืชืงืŸ ืื•ืชื. ื‘ืžืฆื‘ ืคื™ืชื•ื—, React ืžื–ื”ื™ืจื” ืžืคื ื™ ืื™ ื”ืชืืžื•ืช ื‘ืžื”ืœืš ื”ื ื™ืงื•ื™. ืื™ืŸ ื”ื‘ื˜ื—ื•ืช ื›ื™ ื”ื‘ื“ืœื™ ืžืืคื™ื™ื ื™ื ื™ืชื•ืงื ื• ื‘ืžืงืจื” ืฉืœ ืื™-ื”ืชืืžื”. ื–ื” ื—ืฉื•ื‘ ืžืกื™ื‘ื•ืช ืฉืœ ื‘ื™ืฆื•ืขื™ื ื›ื™ ื‘ืจื•ื‘ ื”ืืคืœื™ืงืฆื™ื•ืช, ืื™-ื”ืชืืžื•ืช ื”ืŸ ื“ื‘ืจ ื ื“ื™ืจ, ื•ืœื›ืŸ ืื™ืžื•ืช ื›ืœ ื”-markup ื™ื”ื™ื” ื™ืงืจ ืžื“ื™ ื›ืš ืฉื ืจืฆื” ืœื”ืžื ืข ืžืžื ื•.

ืื ืžืืคื™ื™ืŸ ืื• ืชื•ื›ืŸ ื˜ืงืกื˜ ืฉืœ ืืœืžื ื˜ ื‘ื•ื“ื“ ืฉื•ื ื” ื‘ืื•ืคืŸ ื‘ืœืชื™ ื ืžื ืข ื‘ื™ืŸ ื”ืฉืจืช ืœื‘ื™ืŸ ื”ืœืงื•ื— (ืœื“ื•ื’ืžื”, ื—ื•ืชืžืช ื–ืžืŸ), ืชื•ื›ืœื• ืœื”ืฉืชื™ืง ืืช ื”ืื–ื”ืจื” ืขืœ ื™ื“ื™ ื”ื•ืกืคืช suppressHydrationWarning={true} ืœืืœืžื ื˜. ื–ื” ืขื•ื‘ื“ ืจืง ืขื‘ื•ืจ ืจืžืช ืขื•ืžืง ืื—ืช, ื•ื ื•ืขื“ ืœื”ื™ื•ืช ืจืง ื›ืคืชื— ืžื™ืœื•ื˜. ืืœ ืชืฉืชืžืฉื• ื‘ื–ื” ื™ื•ืชืจ ืžื“ื™. ืืœื ืื ื›ืŸ ืžื“ื•ื‘ืจ ื‘ืชื•ื›ืŸ ื˜ืงืกื˜, React ืขื“ื™ื™ืŸ ืœื ืชื ืกื” ืœืชืงืŸ ืื•ืชื•, ืœื›ืŸ ื™ื™ืชื›ืŸ ืฉื”ื•ื ื™ื™ืฉืืจ ื‘ืœืชื™ ืขืงื‘ื™ ืขื“ ืœืขื“ื›ื•ื ื™ื ืขืชื™ื“ื™ื™ื.

ืื ืืชื ื‘ื›ื•ื•ื ื” ืฆืจื™ื›ื™ื ืœืจื ื“ืจ ืžืฉื”ื• ืฉื•ื ื” ื‘ืฆื“ ื”ืฉืจืช ื•ื‘ืฆื“ ื”ืœืงื•ื—, ืืชื ื™ื›ื•ืœื™ื ืœื‘ืฆืข ืจื™ื ื“ื•ืจ ื‘ืฉื ื™ ืžืขื‘ืจื™ื. ืงื•ืžืคื•ื ื ื˜ื•ืช ื”ืžืจื ื“ืจื•ืช ืžืฉื”ื• ืื—ืจ ื‘ืฆื“ ื”ืœืงื•ื— ื™ื›ื•ืœื•ืช ืœืงืจื•ื ืžืฉืชื ื” ืžื”-state ื›ืžื• this.state.isClient, ืฉืื•ืชื• ืชื•ื›ืœื• ืœื”ื’ื“ื™ืจ ืœ-true ื‘-componentDidMount(). ื‘ื“ืจืš ื–ื• ืžืขื‘ืจ ื”ืจื™ื ื“ื•ืจ ื”ืจืืฉื•ื ื™ ื™ืจื ื“ืจ ืืช ืื•ืชื• ืชื•ื›ืŸ ื›ืžื• ื”ืฉืจืช, ืชื•ืš ื”ื™ืžื ืขื•ืช ืžืื™-ื”ืชืืžื•ืช, ืื‘ืœ ืžืขื‘ืจ ื ื•ืกืฃ ื™ืงืจื” ื‘ืื•ืคืŸ ืกื™ื ื›ืจื•ื ื™ ืžื™ื“ ืœืื—ืจ ื”ื ื™ืงื•ื™. ืฉื™ืžื• ืœื‘ ื›ื™ ื’ื™ืฉื” ื–ื• ืชื”ืคื•ืš ืืช ื”ืงื•ืžืคื•ื ื ื˜ื•ืช ืฉืœื›ื ืœืื™ื˜ื™ื•ืช ื™ื•ืชืจ ื›ื™ ื”ืŸ ืฆืจื™ื›ื•ืช ืœื”ืชืจื ื“ืจ ืคืขืžื™ื™ื, ืื– ื”ืฉืชืžืฉื• ื‘ื” ื‘ื–ื”ื™ืจื•ืช.

ื–ื›ืจื• ืœื”ื™ื•ืช ืžื•ื“ืขื™ื ืœื—ื•ื•ื™ื™ืช ื”ืžืฉืชืžืฉ ืขืœ ื—ื™ื‘ื•ืจื™ื ืื™ื˜ื™ื™ื. ืงื•ื“ ื”-JavaScript ืขืœื•ืœ ืœื”ื˜ืขืŸ ืžืื•ื—ืจ ื™ื•ืชืจ ื‘ืื•ืคืŸ ืžืฉืžืขื•ืชื™ ืžืืฉืจ ืจื™ื ื“ื•ืจ ื”-HTML ื”ืจืืฉื•ื ื™, ื›ืš ืฉืื ืืชื ืžืจื ื“ืจื™ื ืžืฉื”ื• ืฉื•ื ื” ื‘ืจื™ื ื“ื•ืจ ืืฆืœ ื”ืœืงื•ื— ื‘ืœื‘ื“, ื”ืžืขื‘ืจ ื™ื›ื•ืœ ืœื”ื™ื•ืช ืฆื•ืจื. ืขื ื–ืืช, ืื ืžื‘ื•ืฆืข ื”ื™ื˜ื‘, ื–ื” ืขืฉื•ื™ ืœื”ื™ื•ืช ืžื•ืขื™ืœ ืœืจื ื“ืจ โ€œืžืขื˜ืคืชโ€ ืฉืœ ื”ืืคืœื™ืงืฆื™ื” ื‘ืฉืจืช, ื•ืจืง ืœื”ืจืื•ืช ื›ืžื” ื•ื•ื™ื“ื’โ€™ื˜ื™ื ื ื•ืกืคื™ื ืืฆืœ ื”ืœืงื•ื—. ื›ื“ื™ ืœืœืžื•ื“ ื›ื™ืฆื“ ืœืขืฉื•ืช ื–ืืช ืžื‘ืœื™ ืœืงื‘ืœ ื‘ืขื™ื•ืช ืื™-ื”ื”ืชืืžื” ื‘-markup, ืขื™ื™ื ื• ื‘ื”ืกื‘ืจ ื‘ืคืกืงื” ื”ืงื•ื“ืžืช.


unmountComponentAtNode()

unmountComponentAtNode(container)

<<<<<<< HEAD ืžืกื™ืจื” ืงื•ืžืคื•ื ื˜ื” React ืžืชื•ืคืขืœืช ืžื”-DOM ื•ืžื ืงื” ืืช ืžื ื”ืœื™ ื”ืื™ืจื•ืขื™ื ื•ืืช ื”-state. ืื ื”ืงื•ืžืคื•ื ื ื˜ื” ืœื ื”ื•ืคืขืœื” ืขืœ ื”-container, ืงืจื™ืื” ืœืคื•ื ืงืฆื™ื” ื–ื• ืื™ื ื” ืขื•ืฉื” ื“ื‘ืจ. ืžื—ื–ื™ืจื” true ืื ื‘ื™ื˜ื•ืœ ืชืคืขื•ืœ ื”ืงื•ืžืคื•ื ื ื˜ื” ืฆืœื— ื•-false ืื ืœื ื”ื™ืชื” ืงื•ืžืคื•ื ื ื˜ื” ื›ื“ื™ ืœื‘ื˜ืœ ืืช ื”ืคืขืœืชื”. =======

Note:

unmountComponentAtNode has been replaced with root.unmount() in React 18. See createRoot for more info.

Remove a mounted React component from the DOM and clean up its event handlers and state. If no component was mounted in the container, calling this function does nothing. Returns true if a component was unmounted and false if there was no component to unmount.

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b


findDOMNode()

ื”ืขืจื”:

findDOMNode ื”ื™ื ืคืชื— ืžื™ืœื•ื˜ ื”ืžืฉืžืฉืช ื›ื“ื™ ืœื’ืฉืช ืœืฆื•ืžืช ื”-DOM ื”ื‘ืกื™ืกื™. ื‘ืจื•ื‘ ื”ืžืงืจื™ื, ืฉื™ืžื•ืฉ ื‘ืคืชื— ืžื™ืœื•ื˜ ื–ื” ื”ื•ื ืœื ืžื•ืžืœืฅ ืžื›ื™ื•ื•ืŸ ืฉื–ื” ื—ื•ื“ืจ ืืช ื”ืื‘ืกื˜ืจืงืฆื™ื” ืฉืœ ื”ืงื•ืžืคื•ื ื ื˜ื”. ื”ื™ื ื”ื•ืฆืื” ืžืฉื™ืžื•ืฉ ื‘-StrictMode.

findDOMNode(component)

ืื ืงื•ืžืคื•ื ื ื˜ื” ื–ื• ื›ื‘ืจ ื”ื•ืคืขืœื” ืœืชื•ืš ื”-DOM, ืงืจื™ืื” ื–ื• ืžื—ื–ื™ืจื” ืืช ืืœืžื ื˜ ื”-DOM ื”ืชื•ืื ื”ืžืงื•ืจื™ ืฉืœ ื”ื“ืคื“ืคืŸ. ืžืชื•ื“ื” ื–ื• ืฉื™ืžื•ืฉื™ืช ืขื‘ื•ืจ ืงืจื™ืืช ืขืจื›ื™ื ืžืชื•ืš ื”-DOM, ื›ื’ื•ืŸ ืขืจื›ื™ ืฉื“ื•ืช ื˜ื•ืคืก ื•ื‘ื™ืฆื•ืข ืžื“ื™ื“ื•ืช DOM. ื‘ืจื•ื‘ ื”ืžืงืจื™ื, ื ื™ืชืŸ ืœืฆืจืฃ ื”ืคื ื™ื™ื” ืœืฆื•ืžืช DOM ื•ืœื”ื™ืžื ืข ืœื’ืžืจื™ ืžืฉื™ืžื•ืฉ ื‘-findDOMNode.

ื›ืืฉืจ ืงื•ืžืคื•ื ื ื˜ื” ืžืจื•ื ื“ืจืช ืœ-null ืื• false, findDOMNode ืžื—ื–ื™ืจื” null. ื›ืืฉืจ ืงื•ืžืคื•ื ื ื˜ื” ืžืจื•ื ื“ืจืช ืœืžื—ืจื•ื–ืช, findDOMNode ืžื—ื–ื™ืจื” ืฆื•ืžืช DOM ืžืกื•ื’ ื˜ืงืกื˜ ื”ืžื›ื™ืœื” ืืช ื”ืขืจืš. ื”ื—ืœ ืž-React 16, ืงื•ืžืคื•ื ื ื˜ื” ื™ื›ื•ืœื” ืœื”ื—ื–ื™ืจ ืงื˜ืข ืขื ืžืกืคืจ ื™ืœื“ื™ื, ื•ื‘ืžืงืจื” ื›ื–ื” findDOMNode ืชื—ื–ื™ืจ ืืช ืฆื•ืžืช ื”-DOM ื”ืชื•ืื ืœื™ืœื“ ื”ืจืืฉื•ืŸ ืฉืื™ื ื• ืจื™ืง.

ื”ืขืจื”:

findDOMNode ืขื•ื‘ื“ืช ืจืง ืขืœ ืงื•ืžืคื•ื ื ื˜ื•ืช ืฉื”ื•ืคืขืœื• (ื›ืœื•ืžืจ, ืงื•ืžืคื•ื ื ื˜ื•ืช ืฉื›ื‘ืจ ื”ื•ื›ื ืกื• ืœ-DOM). ืื ืืชื ืžื ืกื™ื ืœืงืจื•ื ืœื” ืขืœ ืงื•ืžืคื•ื ื ื˜ื•ืช ืฉืขื“ื™ื™ืŸ ืœื ื”ื•ืคืขืœื• (ื›ืžื• ืงืจื™ืื” ืœ-findDOMNode() ืžืชื•ืš render() ืขืœ ืงื•ืžืคื•ื ื ื˜ื” ืฉืขื“ื™ื™ืŸ ืœื ื ื•ืฆืจื”) ืชื–ืจืง ืฉื’ื™ืื”.

findDOMNode ืœื ื™ื›ื•ืœื” ืœื”ืงืจื ืขืœ ืงื•ืžืคื•ื ื ื˜ื•ืช ืคื•ื ืงืฆื™ื”.


<<<<<<< HEAD

createPortal()

ReactDOM.createPortal(child, container)

ืžื™ื™ืฆืจืช ืคื•ืจื˜ืœ. ืคื•ืจื˜ืœื™ื ืžืกืคืงื™ื ื“ืจืš ืœืจื ื“ืจ ื™ืœื“ื™ื ืœืชื•ืš ืฆื•ืžืช DOM ืฉืงื™ื™ื ืžื—ื•ืฅ ืœื”ื™ืจืจื›ื™ื” ืฉืœ ืงื•ืžืคื•ื ื ื˜ืช ื”-DOM.

84ad3308338e2bb819f4f24fa8e9dfeeffaa970b