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

Function getReactRootElementInContainer

code/redux/public/app.js:17749–17759  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

17747}
17748
17749function getReactRootElementInContainer(container) {
17750 if (!container) {
17751 return null;
17752 }
17753
17754 if (container.nodeType === DOCUMENT_NODE) {
17755 return container.documentElement;
17756 } else {
17757 return container.firstChild;
17758 }
17759}
17760
17761function shouldHydrateDueToLegacyHeuristic(container) {
17762 var rootElement = getReactRootElementInContainer(container);

Callers 2

app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected