MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getReactRootElementInContainer

Function getReactRootElementInContainer

code/third-party/public/app.js:16731–16741  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

16729}
16730
16731function getReactRootElementInContainer(container) {
16732 if (!container) {
16733 return null;
16734 }
16735
16736 if (container.nodeType === DOCUMENT_NODE) {
16737 return container.documentElement;
16738 } else {
16739 return container.firstChild;
16740 }
16741}
16742
16743function shouldHydrateDueToLegacyHeuristic(container) {
16744 var rootElement = getReactRootElementInContainer(container);

Callers 2

app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected