{"record":{"id":"ba82686ae832a466","repo":"facebook/react","slug":"305","errorCode":"305","errorMessage":"The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.","messagePattern":"The current renderer does not support hydration\\. 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/ReactFiberConfigWithNoHydration.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 hydration. ' +\n      'This error is likely caused by a bug in React. ' +\n      'Please file an issue.',\n  );\n}\n\n// Hydration (when unsupported)\nexport type ActivityInstance = mixed;\nexport type SuspenseInstance = mixed;\nexport const supportsHydration = false;\nexport const isSuspenseInstancePending = shim;\nexport const isSuspenseInstanceFallback = shim;\nexport const getSuspenseInstanceFallbackErrorDetails = shim;\nexport const registerSuspenseInstanceRetry = shim;\nexport const canHydrateFormStateMarker = shim;\nexport const isFormStateMarkerMatching = shim;\nexport const getNextHydratableSibling = shim;\nexport const getNextHydratableSiblingAfterSingleton = shim;","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberConfigWithNoHydration.js#L1-L32","documentation":"React renderers that cannot hydrate re-export everything from ReactFiberConfigWithNoHydration; every hydration hook is a shim that throws this error when called. The config also exports `supportsHydration = false` so the reconciler can usually avoid these paths — hitting the shim means a hydration API was invoked on a renderer with no hydration support.","triggerScenarios":"Calling a hydration entry point (hydrateRoot-style render, prepareToHydrateHostInstance paths, or a hydrating container) with a renderer whose host config re-exports NoHydration — e.g. react-native, React Test Renderer, art, or a custom renderer built from a no-hydration config.","commonSituations":"Porting SSR-style code to React Native or a custom renderer and reusing hydrateRoot/hydrate calls; custom renderer authors forgetting to implement hydration while the app calls hydrate APIs.","solutions":["Switch that surface to plain client rendering: createRoot(...).render(...) instead of hydrate.","Use a renderer that supports hydration (react-dom) for SSR hydration paths.","Custom renderer: implement the hydration methods in your host config (or re-export the *WithHydration variants) instead of the NoHydration shims."],"exampleFix":"// before (renderer without hydration support)\nhydrateRoot(document.getElementById('root'), <App />);\n\n// after: client render, or switch to react-dom for hydration\ncreateRoot(document.getElementById('root')).render(<App />);","handlingStrategy":"validation","validationCode":"// Feature-detect hydration support before calling hydrate APIs\nconst canHydrate =\n  typeof container.querySelector === 'function' &&\n  typeof hydrateRoot === 'function';\nif (!canHydrate) {\n  createRoot(container).render(<App />);\n} else {\n  hydrateRoot(container, <App />);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never reuse hydrateRoot calls on react-native/custom renderer trees","Custom renderer authors: declare hydration capability accurately (supportsHydration) and implement or consciously exclude the hooks","Keep SSR entry points separate from native/custom entry points"],"tags":["hydration","custom-renderer","renderer-capability","react-native"],"backgroundTag":"hydration-not-supported","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}