diff --git a/packages/react-devtools-shared/src/backend/fiber/renderer.js b/packages/react-devtools-shared/src/backend/fiber/renderer.js index 9a342a6731caf..fc054d817d46b 100644 --- a/packages/react-devtools-shared/src/backend/fiber/renderer.js +++ b/packages/react-devtools-shared/src/backend/fiber/renderer.js @@ -5278,14 +5278,9 @@ export function attach( // TODO: relying on this seems a bit fishy. const wasMounted = prevFiber.memoizedState != null && - prevFiber.memoizedState.element != null && - // A dehydrated root is not considered mounted - prevFiber.memoizedState.isDehydrated !== true; + prevFiber.memoizedState.element != null; const isMounted = - current.memoizedState != null && - current.memoizedState.element != null && - // A dehydrated root is not considered mounted - current.memoizedState.isDehydrated !== true; + current.memoizedState != null && current.memoizedState.element != null; if (!wasMounted && isMounted) { // Mount a new root. setRootPseudoKey(currentRoot.id, current); diff --git a/packages/react-devtools-shared/src/utils.js b/packages/react-devtools-shared/src/utils.js index ea921c2988c3d..34c258ebe2b98 100644 --- a/packages/react-devtools-shared/src/utils.js +++ b/packages/react-devtools-shared/src/utils.js @@ -300,7 +300,7 @@ export function printOperationsArray(operations: Array) { } case TREE_OPERATION_SET_SUBTREE_MODE: { const id = operations[i + 1]; - const mode = operations[i + 1]; + const mode = operations[i + 2]; i += 3; @@ -339,11 +339,11 @@ export function printOperationsArray(operations: Array) { const fiberID = operations[i + 1]; const parentID = operations[i + 2]; const nameStringID = operations[i + 3]; - const name = stringTable[nameStringID]; const numRects = operations[i + 4]; i += 5; + const name = stringTable[nameStringID]; let rects: string; if (numRects === -1) { rects = 'null';