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
6 changes: 4 additions & 2 deletions packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
if (updateQueue !== null) {
const nextProps = workInProgress.pendingProps;
const prevState = workInProgress.memoizedState;
const prevChildren = prevState !== null ? prevState.children : null;
const prevChildren = prevState !== null ? prevState.element : null;
processUpdateQueue(
workInProgress,
updateQueue,
Expand All @@ -426,7 +426,9 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
renderExpirationTime,
);
const nextState = workInProgress.memoizedState;
const nextChildren = nextState.children;
// Caution: React DevTools currently depends on this property
// being called "element".
const nextChildren = nextState.element;

if (nextChildren === prevChildren) {
// If the state is the same as before, that's a bailout because we had
Expand Down
4 changes: 3 additions & 1 deletion packages/react-reconciler/src/ReactFiberReconciler.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
}

const update = createUpdate(expirationTime);
update.payload = {children: element};
// Caution: React DevTools currently depends on this property
// being called "element".
update.payload = {element};

callback = callback === undefined ? null : callback;
if (callback !== null) {
Expand Down
4 changes: 3 additions & 1 deletion packages/react-reconciler/src/ReactFiberUnwindWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export default function<C, CX>(
const update = createUpdate(expirationTime);
// Unmount the root by rendering null.
update.tag = CaptureUpdate;
update.payload = {children: null};
// Caution: React DevTools currently depends on this property
// being called "element".
update.payload = {element: null};
const error = errorInfo.value;
update.callback = () => {
onUncaughtError(error);
Expand Down