{"record":{"id":"07ee53e2713b064e","repo":"facebook/react","slug":"442","errorCode":"442","errorMessage":"The current renderer does not support Resources. This error is likely caused by a bug in React. Please file an issue.","messagePattern":"The current renderer does not support Resources\\. This error is likely caused by a bug in React\\. Please file an issue\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberConfigWithNoResources.js","lineNumber":14,"sourceCode":"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// Renderers that don't support hydration\n// can re-export everything from this module.\n\nfunction shim(...args: any): empty {\n  throw new Error(\n    'The current renderer does not support Resources. ' +\n      'This error is likely caused by a bug in React. ' +\n      'Please file an issue.',\n  );\n}\n\nexport type HoistableRoot = mixed;\nexport type Resource = mixed;\n\n// Resources (when unsupported)\nexport const supportsResources = false;\nexport const isHostHoistableType = shim;\nexport const getHoistableRoot = shim;\nexport const getResource = shim;\nexport const acquireResource = shim;\nexport const releaseResource = shim;\nexport const hydrateHoistable = shim;\nexport const mountHoistable = shim;","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberConfigWithNoResources.js#L1-L32","documentation":"React's Resource system (float): hoistable elements like <link rel=\"stylesheet\" precedence>, <title>, <meta>, and async <script> are managed as Resources by the reconciler. Renderers that don't implement the Resource API re-export ReactFiberConfigWithNoResources, where isHostHoistableType and the other resource hooks are throwing shims (`supportsResources = false`). Rendering a hoistable element against such a config throws this error.","triggerScenarios":"Rendering <link rel=\"stylesheet\" href=\"...\" precedence=\"default\"> (or <title>, <meta>, <script async src>) inside a tree driven by a renderer whose host config re-exports NoResources — react-native, art, test renderers, most custom renderers.","commonSituations":"Sharing component libraries between web and react-native/custom renderers where styles are emitted via precedence-based <link> tags; testing DOM components with React Test Renderer.","solutions":["Drop the `precedence` prop (a plain <link> without precedence is a normal host element, not a Resource) or render the link via a <head>-injected script on non-DOM targets.","Gate Resource-based elements to react-dom: render them only when running in a DOM environment.","Custom renderer authors: implement the Resources API in your host config if your target can manage hoistables."],"exampleFix":"// before: Resource API on a renderer without support\n<link rel=\"stylesheet\" href=\"/app.css\" precedence=\"default\" />\n\n// after: plain element, or DOM-only branch\n{isDom ? (\n  <link rel=\"stylesheet\" href=\"/app.css\" precedence=\"default\" />\n) : null}","handlingStrategy":"type-guard","validationCode":"// Only emit Resource-based elements where the renderer supports them\nconst isDom = typeof document !== 'undefined';\nconst styleLink = isDom\n  ? <link rel=\"stylesheet\" href=\"/app.css\" precedence=\"default\" />\n  : null;","typeGuard":"function isHoistableResourceElement(element) {\n  if (!element || typeof element !== 'object') return false;\n  const t = element.type;\n  if (t === 'link') return Boolean(element.props?.precedence);\n  return t === 'title' || t === 'meta' || (t === 'script' && element.props?.async);\n}","tryCatchPattern":null,"preventionTips":["Never ship precedence-based <link>, <title>, <meta>, or async <script> in shared cross-platform components","Branch on environment (DOM vs native) for style emission","Custom renderer authors: re-export the no-resources shim only if you also keep hoistables out of your trees"],"tags":["resources","float","custom-renderer","stylesheets","react-native"],"backgroundTag":"resource-hoisting-unsupported","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}