MCPcopy
hub / github.com/tastejs/todomvc / getContextForSubtree

Function getContextForSubtree

examples/typescript-react/js/bundle.js:20175–20191  ·  view source on GitHub ↗
(parentComponent)

Source from the content-addressed store, hash-verified

20173}
20174
20175function getContextForSubtree(parentComponent) {
20176 if (!parentComponent) {
20177 return emptyContextObject;
20178 }
20179
20180 var fiber = get(parentComponent);
20181 var parentContext = findCurrentUnmaskedContext(fiber);
20182
20183 if (fiber.tag === ClassComponent) {
20184 var Component = fiber.type;
20185 if (isContextProvider(Component)) {
20186 return processChildContext(fiber, Component, parentContext);
20187 }
20188 }
20189
20190 return parentContext;
20191}
20192
20193function scheduleRootUpdate(current$$1, element, expirationTime, callback) {
20194 {

Callers 1

Calls 4

isContextProviderFunction · 0.85
processChildContextFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected