(workInProgress, Component)
| 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 | } |
no test coverage detected
searching dependent graphs…