{"record":{"id":"00efb35d5ddf0b4e","repo":"react/react","slug":"expected-a-placed-child-to-be-moved-from-the-remai","errorCode":null,"errorMessage":"Expected a placed child to be moved from the remaining set.","messagePattern":"Expected a placed child to be moved from the remaining set\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-devtools-shared/src/backend/fiber/renderer.js","lineNumber":2503,"sourceCode":"      }\n      // Already deleted.\n      return;\n    }\n    const parentInstance = reconcilingParent;\n    if (parentInstance === null) {\n      throw new Error('Should not have a parent if we are at the root');\n    }\n    if (instance.parent !== parentInstance) {\n      throw new Error(\n        'Cannot remove a node from a different parent than is being reconciled.',\n      );\n    }\n    // Remove an existing child from its current position, which we assume is in the\n    // remainingReconcilingChildren set.\n    if (previousSibling === null) {\n      // We're first in the remaining set. Remove us.\n      if (remainingReconcilingChildren !== instance) {\n        throw new Error(\n          'Expected a placed child to be moved from the remaining set.',\n        );\n      }\n      remainingReconcilingChildren = instance.nextSibling;\n    } else {\n      previousSibling.nextSibling = instance.nextSibling;\n    }\n    instance.nextSibling = null;\n    instance.parent = null;\n\n    // Remove any SuspenseNode from its parent.\n    const suspenseNode = instance.suspenseNode;\n    if (suspenseNode !== null && suspenseNode.parent !== null) {\n      const parentNode = reconcilingParentSuspenseNode;\n      if (parentNode === null) {\n        throw new Error('Should not have a parent if we are at the root');\n      }\n      if (suspenseNode.parent !== parentNode) {","sourceCodeStart":2485,"sourceCodeEnd":2521,"githubUrl":"https://github.com/react/react/blob/22e4f993c7ce9373c95aef093b003f84249e2045/packages/react-devtools-shared/src/backend/fiber/renderer.js#L2485-L2521","documentation":"Thrown in removeChild when previousSibling is null (meaning this instance should be the head of the remainingReconcilingChildren list) but remainingReconcilingChildren !== instance. The remaining-children list is a singly-linked list where the head is tracked by the remainingReconcilingChildren variable. If the caller says 'this is the first child' (previousSibling === null) but the list head points elsewhere, the linked list has become inconsistent — the instance is not where the caller expects it to be.","triggerScenarios":"removeChild is called with previousSibling === null, indicating the instance is first in the remaining set, but remainingReconcilingChildren points to a different instance. This means the remaining-children list head was updated (or corrupted) independently of this removal request.","commonSituations":"Linked-list pointer corruption during child reordering; multiple passes touching the same remaining-children list; DevTools internal state desync during rapid reconciliation of key lists.","solutions":["Update React DevTools to the latest version.","Reduce key-list reordering complexity and check if the issue is triggered by specific key patterns.","Report the issue with the list-reordering scenario that triggers it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before unlinking as head, verify the list head matches\nif (previousSibling === null && remainingReconcilingChildren !== instance) {\n  // List head mismatch — search for the instance instead of assuming head\n  return;\n}","typeGuard":"function isRemainingChildrenHead(instance: DevToolsInstance): boolean {\n  return remainingReconcilingChildren === instance;\n}","tryCatchPattern":null,"preventionTips":["Keep React DevTools updated.","When developing DevTools, ensure remainingReconcilingChildren is updated atomically with every head removal.","Report key-list reordering scenarios that trigger list-head corruption."],"tags":["devtools-internal","reconciliation","linked-list","child-placement"],"backgroundTag":null,"analyzedSha":"22e4f993c7ce9373c95aef093b003f84249e2045","analyzedAt":"2026-08-12T22:33:25.580Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}