@samitouri / QOS-React / commits / 264a921054

Clear pending props when cloning from current

When we create a new work-in-progress, the existing pending props are no longer valid.

Andrew Clark committed Jun 19, 2017 at 15:02 UTC 264a921054e09f53f54872ccd9e6a715406ac09c
1 file changed +3
src/renderers/shared/fiber/ReactChildFiber.js
+3
@@ -1462,6 +1462,8 @@ exports.cloneChildFibers = function(
1462
1463 let currentChild = workInProgress.child;
1464 let newChild = createWorkInProgress(currentChild, renderPriority);
1465 + // TODO: Pass this as an argument, since it's easy to forget.
1466 + newChild.pendingProps = null;
1467 workInProgress.child = newChild;
1468
1469 newChild.return = workInProgress;
@@ -1471,6 +1473,7 @@ exports.cloneChildFibers = function(
1473 currentChild,
1474 renderPriority,
1475 );
1476 + newChild.pendingProps = null;
1477 newChild.return = workInProgress;
1478 }
1479 newChild.sibling = null;