{"record":{"id":"e1893dbd4be32b4c","repo":"facebook/react","slug":"unsupported-type-type-specified-for-icon","errorCode":null,"errorMessage":"Unsupported type \"${type}\" specified for Icon","messagePattern":"Unsupported type \"(.+?)\" specified for Icon","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/react-devtools-shared/src/devtools/views/Icon.js","lineNumber":102,"sourceCode":"      break;\n    case 'settings':\n      pathData = PATH_SETTINGS;\n      break;\n    case 'store-as-global-variable':\n      pathData = PATH_STORE_AS_GLOBAL_VARIABLE;\n      break;\n    case 'strict-mode-non-compliant':\n      pathData = PATH_STRICT_MODE_NON_COMPLIANT;\n      break;\n    case 'suspense':\n      pathData = PATH_SUSPEND;\n      viewBox = '-2 -2 28 28';\n      break;\n    case 'warning':\n      pathData = PATH_WARNING;\n      break;\n    default:\n      console.warn(`Unsupported type \"${type}\" specified for Icon`);\n      break;\n  }\n\n  return (\n    <svg\n      {...props}\n      xmlns=\"http://www.w3.org/2000/svg\"\n      className={`${styles.Icon} ${className}`}\n      width=\"24\"\n      height=\"24\"\n      viewBox={viewBox}>\n      {title && <title>{title}</title>}\n      <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n      <path fill=\"currentColor\" d={pathData} />\n    </svg>\n  );\n}\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-devtools-shared/src/devtools/views/Icon.js#L84-L120","documentation":"Icon (packages/react-devtools-shared/src/devtools/views/Icon.js) maps a type prop to an SVG path over a fixed set ('arrow', 'bug', 'code', 'components', 'copy', 'error', 'facebook', 'flame-chart', 'profiler', 'ranked-chart', 'search', 'find', 'settings', 'store-as-global-variable', 'strict-mode-non-compliant', 'suspense', 'warning'). Any other value hits the default branch, warns, and renders an icon with an empty path. It is the same pattern as ButtonIcon: an unrecognized enum-ish prop value.","triggerScenarios":"Passing a type not in the switch (typo, or an icon name added in a newer DevTools than the react-devtools-shared copy in use); computing the icon type from external data that can contain arbitrary strings.","commonSituations":"Custom DevTools embeds lagging upstream icon additions; copy-pasting icon names across versions; refactors that rename types (e.g. 'search' vs 'find').","solutions":["Use one of the literal type values handled in Icon.js.","Diff your icon names against the version of react-devtools-shared you depend on (names change between releases).","Upgrade react-devtools-shared if you intended to use a newly added icon."],"exampleFix":"// before\n<Icon type=\"flamechart\" />\n\n// after\n<Icon type=\"flame-chart\" />","handlingStrategy":"type-guard","validationCode":"const ICON_TYPES = new Set([\n  'arrow', 'bug', 'code', 'components', 'copy', 'error', 'facebook',\n  'flame-chart', 'profiler', 'ranked-chart', 'search', 'find', 'settings',\n  'store-as-global-variable', 'strict-mode-non-compliant', 'suspense',\n  'warning',\n]);\nif (!ICON_TYPES.has(type)) {\n  throw new Error(`Unknown Icon type: ${type}`);\n}","typeGuard":"type IconType =\n  | 'arrow' | 'bug' | 'code' | 'components' | 'copy' | 'error' | 'facebook'\n  | 'flame-chart' | 'profiler' | 'ranked-chart' | 'search' | 'find'\n  | 'settings' | 'store-as-global-variable' | 'strict-mode-non-compliant'\n  | 'suspense' | 'warning';\n\n// Mirror this list from the Icon.js switch in YOUR react-devtools-shared version.","tryCatchPattern":null,"preventionTips":["Use a union type at the call site so invalid icon names fail at compile time.","Check the Icon.js switch after upgrading react-devtools-shared for renamed types (e.g. search vs find).","Never derive icon types from external data without validating against the known set."],"tags":["react-devtools","icon","invalid-prop-value","ui"],"backgroundTag":"invalid-prop-value","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}