Skip to content

Commit

Permalink
This is 💯% definitely not the correct fix at all
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdustan authored and gaearon committed Mar 29, 2018
1 parent f092444 commit 8686c0f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,18 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
renderExpirationTime,
);
} else if (oldProps !== null && oldProps.children === newProps.children) {
// No change. Bailout early if children are the same.
return bailoutOnAlreadyFinishedWork(current, workInProgress);
let bail = true;
const stateNode = current.return.return.stateNode;
for (const key in stateNode) {
if (stateNode[key] === newProps.children) {
bail = false;
break;
}
}
if (bail) {
// No change. Bailout early if children are the same.
return bailoutOnAlreadyFinishedWork(current, workInProgress);
}
}

const render = newProps.children;
Expand Down

0 comments on commit 8686c0f

Please sign in to comment.