(unitOfWork)
| 22276 | } |
| 22277 | |
| 22278 | function performUnitOfWork(unitOfWork) { |
| 22279 | // The current, flushed, state of this fiber is the alternate. Ideally |
| 22280 | // nothing should rely on this, but relying on it here means that we don't |
| 22281 | // need an additional field on the work in progress. |
| 22282 | var current = unitOfWork.alternate; |
| 22283 | startWorkTimer(unitOfWork); |
| 22284 | setCurrentFiber(unitOfWork); |
| 22285 | var next; |
| 22286 | |
| 22287 | if ( (unitOfWork.mode & ProfileMode) !== NoMode) { |
| 22288 | startProfilerTimer(unitOfWork); |
| 22289 | next = beginWork$1(current, unitOfWork, renderExpirationTime$1); |
| 22290 | stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); |
| 22291 | } else { |
| 22292 | next = beginWork$1(current, unitOfWork, renderExpirationTime$1); |
| 22293 | } |
| 22294 | |
| 22295 | resetCurrentFiber(); |
| 22296 | unitOfWork.memoizedProps = unitOfWork.pendingProps; |
| 22297 | |
| 22298 | if (next === null) { |
| 22299 | // If this doesn't spawn new work, complete the current work. |
| 22300 | next = completeUnitOfWork(unitOfWork); |
| 22301 | } |
| 22302 | |
| 22303 | ReactCurrentOwner$2.current = null; |
| 22304 | return next; |
| 22305 | } |
| 22306 | |
| 22307 | function completeUnitOfWork(unitOfWork) { |
| 22308 | // Attempt to complete the current unit of work, then move to the next |
no test coverage detected