MCPcopy Index your code
hub / github.com/caseywebdev/react-list / validateFunctionComponentInDev

Function validateFunctionComponentInDev

docs/index.js:27332–27357  ·  view source on GitHub ↗
(workInProgress, Component)

Source from the content-addressed store, hash-verified

27330 return workInProgress.child;
27331 }
27332 function validateFunctionComponentInDev(workInProgress, Component) {
27333 Component &&
27334 Component.childContextTypes &&
27335 console.error(
27336 "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
27337 Component.displayName || Component.name || "Component"
27338 );
27339 "function" === typeof Component.getDerivedStateFromProps &&
27340 ((workInProgress = getComponentNameFromType(Component) || "Unknown"),
27341 didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] ||
27342 (console.error(
27343 "%s: Function components do not support getDerivedStateFromProps.",
27344 workInProgress
27345 ),
27346 (didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] =
27347 !0)));
27348 "object" === typeof Component.contextType &&
27349 null !== Component.contextType &&
27350 ((Component = getComponentNameFromType(Component) || "Unknown"),
27351 didWarnAboutContextTypeOnFunctionComponent[Component] ||
27352 (console.error(
27353 "%s: Function components do not support contextType.",
27354 Component
27355 ),
27356 (didWarnAboutContextTypeOnFunctionComponent[Component] = !0)));
27357 }
27358 function mountSuspenseOffscreenState(renderLanes) {
27359 return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
27360 }

Callers 3

updateMemoComponentFunction · 0.85
updateFunctionComponentFunction · 0.85
beginWorkFunction · 0.85

Calls 1

getComponentNameFromTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…