Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/renderers/shared/fiber/ReactChildFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,6 @@ exports.mountChildFibersInPlace = ChildReconciler(false, false);
exports.cloneChildFibers = function(
current: Fiber | null,
workInProgress: Fiber,
renderPriority: PriorityLevel,
): void {
invariant(
current === null || workInProgress.child === current.child,
Expand All @@ -1461,7 +1460,10 @@ exports.cloneChildFibers = function(
}

let currentChild = workInProgress.child;
let newChild = createWorkInProgress(currentChild, renderPriority);
let newChild = createWorkInProgress(
currentChild,
currentChild.pendingWorkPriority,
);
// TODO: Pass this as an argument, since it's easy to forget.
newChild.pendingProps = currentChild.pendingProps;
workInProgress.child = newChild;
Expand All @@ -1471,7 +1473,7 @@ exports.cloneChildFibers = function(
currentChild = currentChild.sibling;
newChild = newChild.sibling = createWorkInProgress(
currentChild,
renderPriority,
currentChild.pendingWorkPriority,
);
newChild.pendingProps = currentChild.pendingProps;
newChild.return = workInProgress;
Expand Down
4 changes: 1 addition & 3 deletions src/renderers/shared/fiber/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
// return null;
// }

// TODO: Pass the priority as an argument
const renderPriority = workInProgress.pendingWorkPriority;
cloneChildFibers(current, workInProgress, renderPriority);
cloneChildFibers(current, workInProgress);
return workInProgress.child;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ exports[`ReactDebugFiberPerf deduplicates lifecycle names during commit to reduc
⚛ B.componentDidUpdate
⚛ B [update]
⛔ (Committing Changes) Warning: Caused by a cascading update in earlier commit
⚛ (Committing Host Effects: 6 Total)
⚛ (Calling Lifecycle Methods: 6 Total)
⚛ (Committing Host Effects: 3 Total)
⚛ (Calling Lifecycle Methods: 3 Total)
⚛ B.componentDidUpdate
"
`;
Expand Down