{"record":{"id":"bc87581c5b8a018f","repo":"react/react","slug":"not-implemented-for-work-tag-fiber-tag","errorCode":null,"errorMessage":"not implemented for work tag ${fiber.tag}","messagePattern":"not implemented for work tag (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-devtools-shared/src/backend/fiber/renderer.js","lineNumber":1024,"sourceCode":"  }\n\n  function getEnvironmentNames(): Array<string> {\n    return Array.from(knownEnvironmentNames);\n  }\n\n  function isFiberHydrated(fiber: Fiber): boolean {\n    if (OffscreenComponent === -1) {\n      throw new Error('not implemented for legacy suspense');\n    }\n    switch (fiber.tag) {\n      case HostRoot:\n        const rootState = fiber.memoizedState;\n        return !rootState.isDehydrated;\n      case SuspenseComponent:\n        const suspenseState = fiber.memoizedState;\n        return suspenseState === null || suspenseState.dehydrated === null;\n      default:\n        throw new Error('not implemented for work tag ' + fiber.tag);\n    }\n  }\n\n  function shouldFilterVirtual(\n    data: ReactComponentInfo,\n    secondaryEnv: null | string,\n  ): boolean {\n    if (!isInFocusedActivity) {\n      return true;\n    }\n\n    // For purposes of filtering Server Components are always Function Components.\n    // Environment will be used to filter Server vs Client.\n    // Technically they can be forwardRef and memo too but those filters will go away\n    // as those become just plain user space function components like any HoC.\n    if (hideElementsWithTypes.has(ElementTypeFunction)) {\n      return true;\n    }","sourceCodeStart":1006,"sourceCodeEnd":1042,"githubUrl":"https://github.com/react/react/blob/22e4f993c7ce9373c95aef093b003f84249e2045/packages/react-devtools-shared/src/backend/fiber/renderer.js#L1006-L1042","documentation":"Thrown by isFiberHydrated() when it receives a Fiber whose tag is neither HostRoot nor SuspenseComponent. The function inspects a Fiber's memoizedState to determine hydration status, but only knows how to interpret those two work tags. Both call sites (renderer.js:3295 and :3359) guard on fiber.tag === SuspenseComponent before calling, so reaching the default branch means DevTools' internal call ordering is wrong or React introduced a new work tag that DevTools has not mapped yet. The function also throws 'not implemented for legacy suspense' when OffscreenComponent === -1 (old React without Offscreen), though that path is unreachable from the current call sites because they sit inside an OffscreenComponent !== -1 else-block.","triggerScenarios":"isFiberHydrated is invoked with a Fiber whose .tag does not match HostRoot (3) or SuspenseComponent (13). This happens when React adds a new work tag constant that the installed DevTools version does not recognize, or when an internal DevTools refactor removes the SuspenseComponent guard before the call.","commonSituations":"Upgrading to a canary or experimental React build that introduces new component types before DevTools is updated; running a forked React with custom work tags; mixing React 18 DevTools with React 19+ runtime.","solutions":["Update the React DevTools browser extension (or @react-devtools-core package) to the latest version matching your React build.","Check whether your React version is canary/experimental — downgrade to a stable React release that DevTools fully supports.","If embedding DevTools in a custom tool, verify the ReactTypeOfWork constants passed to the renderer match the React version being inspected.","File a bug against react-devtools with the React version, DevTools version, and the numeric tag value that appeared in the message."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// Before calling isFiberHydrated or processing a fiber tag:\nconst SUPPORTED_HYDRATION_TAGS = new Set([HostRoot, SuspenseComponent]);\nif (OffscreenComponent !== -1 && SUPPORTED_HYDRATION_TAGS.has(fiber.tag)) {\n  // safe to inspect hydration\n  const hydrated = isFiberHydrated(fiber);\n}","typeGuard":"function isHydrationSupportedTag(fiber: Fiber): boolean {\n  return (\n    OffscreenComponent !== -1 &&\n    (fiber.tag === HostRoot || fiber.tag === SuspenseComponent)\n  );\n}","tryCatchPattern":null,"preventionTips":["Keep React DevTools version aligned with the React runtime version being inspected.","Avoid using canary/experimental React builds unless you also run the matching DevTools build.","When forking DevTools, map every work tag constant from the target React version into ReactTypeOfWork."],"tags":["devtools-internal","fiber-tag","hydration","version-mismatch"],"backgroundTag":null,"analyzedSha":"22e4f993c7ce9373c95aef093b003f84249e2045","analyzedAt":"2026-08-12T22:33:25.580Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}