MCPcopy Index your code
hub / github.com/microsoft/SandDance / getContextForSubtree

Function getContextForSubtree

docs/external/js/react-dom.development.js:24389–24406  ·  view source on GitHub ↗
(parentComponent)

Source from the content-addressed store, hash-verified

24387 }
24388
24389 function getContextForSubtree(parentComponent) {
24390 if (!parentComponent) {
24391 return emptyContextObject;
24392 }
24393
24394 var fiber = get(parentComponent);
24395 var parentContext = findCurrentUnmaskedContext(fiber);
24396
24397 if (fiber.tag === ClassComponent) {
24398 var Component = fiber.type;
24399
24400 if (isContextProvider(Component)) {
24401 return processChildContext(fiber, Component, parentContext);
24402 }
24403 }
24404
24405 return parentContext;
24406 }
24407
24408 function findHostInstanceWithWarning(component, methodName) {
24409 {

Callers 1

updateContainerFunction · 0.85

Calls 4

isContextProviderFunction · 0.85
processChildContextFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected