facebook/react · error · Error

305

305

Error message

The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.

What it means

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.

Source

Thrown at packages/react-reconciler/src/ReactFiberConfigWithNoHydration.js:14

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

// Renderers that don't support hydration
// can re-export everything from this module.

function shim(...args: any): empty {
  throw new Error(
    'The current renderer does not support hydration. ' +
      'This error is likely caused by a bug in React. ' +
      'Please file an issue.',
  );
}

// Hydration (when unsupported)
export type ActivityInstance = mixed;
export type SuspenseInstance = mixed;
export const supportsHydration = false;
export const isSuspenseInstancePending = shim;
export const isSuspenseInstanceFallback = shim;
export const getSuspenseInstanceFallbackErrorDetails = shim;
export const registerSuspenseInstanceRetry = shim;
export const canHydrateFormStateMarker = shim;
export const isFormStateMarkerMatching = shim;
export const getNextHydratableSibling = shim;
export const getNextHydratableSiblingAfterSingleton = shim;

View on GitHub (pinned to eafeac097b)

Solutions

  1. Switch that surface to plain client rendering: createRoot(...).render(...) instead of hydrate.
  2. Use a renderer that supports hydration (react-dom) for SSR hydration paths.
  3. Custom renderer: implement the hydration methods in your host config (or re-export the *WithHydration variants) instead of the NoHydration shims.

Example fix

// before (renderer without hydration support)
hydrateRoot(document.getElementById('root'), <App />);

// after: client render, or switch to react-dom for hydration
createRoot(document.getElementById('root')).render(<App />);
Defensive patterns

Strategy: validation

Validate before calling

// Feature-detect hydration support before calling hydrate APIs
const canHydrate =
  typeof container.querySelector === 'function' &&
  typeof hydrateRoot === 'function';
if (!canHydrate) {
  createRoot(container).render(<App />);
} else {
  hydrateRoot(container, <App />);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of facebook/react@eafeac097b (2026-08-21). Data as JSON: /api/errors/ba82686ae832a466. Report an issue: GitHub.