MCPcopy Create free account
hub / github.com/reactjs/react-rails / createRootImpl

Function createRootImpl

lib/assets/react-source/development/react.js:28317–28330  ·  view source on GitHub ↗
(container, tag, options)

Source from the content-addressed store, hash-verified

28315 };
28316
28317 function createRootImpl(container, tag, options) {
28318 // Tag is either LegacyRoot or Concurrent Root
28319 var hydrate = options != null && options.hydrate === true;
28320 var hydrationCallbacks = options != null && options.hydrationOptions || null;
28321 var root = createContainer(container, tag, hydrate);
28322 markContainerAsRoot(root.current, container);
28323
28324 if (hydrate && tag !== LegacyRoot) {
28325 var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;
28326 eagerlyTrapReplayableEvents(container, doc);
28327 }
28328
28329 return root;
28330 }
28331 function createLegacyRoot(container, options) {
28332 return new ReactDOMBlockingRoot(container, LegacyRoot, options);
28333 }

Callers 2

ReactDOMRootFunction · 0.85
ReactDOMBlockingRootFunction · 0.85

Calls 3

createContainerFunction · 0.85
markContainerAsRootFunction · 0.85

Tested by

no test coverage detected