(element, container, parentComponent, callback)
| 24453 | return createFiberRoot(containerInfo, tag, hydrate); |
| 24454 | } |
| 24455 | function updateContainer(element, container, parentComponent, callback) { |
| 24456 | { |
| 24457 | onScheduleRoot(container, element); |
| 24458 | } |
| 24459 | |
| 24460 | var current$1 = container.current; |
| 24461 | var currentTime = requestCurrentTimeForUpdate(); |
| 24462 | |
| 24463 | { |
| 24464 | // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests |
| 24465 | if ('undefined' !== typeof jest) { |
| 24466 | warnIfUnmockedScheduler(current$1); |
| 24467 | warnIfNotScopedWithMatchingAct(current$1); |
| 24468 | } |
| 24469 | } |
| 24470 | |
| 24471 | var suspenseConfig = requestCurrentSuspenseConfig(); |
| 24472 | var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig); |
| 24473 | var context = getContextForSubtree(parentComponent); |
| 24474 | |
| 24475 | if (container.context === null) { |
| 24476 | container.context = context; |
| 24477 | } else { |
| 24478 | container.pendingContext = context; |
| 24479 | } |
| 24480 | |
| 24481 | { |
| 24482 | if (isRendering && current !== null && !didWarnAboutNestedUpdates) { |
| 24483 | didWarnAboutNestedUpdates = true; |
| 24484 | |
| 24485 | error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown'); |
| 24486 | } |
| 24487 | } |
| 24488 | |
| 24489 | var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property |
| 24490 | // being called "element". |
| 24491 | |
| 24492 | update.payload = { |
| 24493 | element: element |
| 24494 | }; |
| 24495 | callback = callback === undefined ? null : callback; |
| 24496 | |
| 24497 | if (callback !== null) { |
| 24498 | { |
| 24499 | if (typeof callback !== 'function') { |
| 24500 | error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback); |
| 24501 | } |
| 24502 | } |
| 24503 | |
| 24504 | update.callback = callback; |
| 24505 | } |
| 24506 | |
| 24507 | enqueueUpdate(current$1, update); |
| 24508 | scheduleWork(current$1, expirationTime); |
| 24509 | return expirationTime; |
| 24510 | } |
| 24511 | function getPublicRootInstance(container) { |
| 24512 | var containerFiber = container.current; |
no test coverage detected