facebook/react · error · Error

275

275

Error message

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

What it means

Renderers that don't mutate the host tree re-export ReactFiberConfigWithNoMutation: every mutation commit hook (appendChild, commitUpdate, removeChild, insertBefore, clearContainer, etc.) is a throwing shim and `supportsMutation = false`. The reconciler calls these during the mutation phase of a commit; seeing this error means a mutating commit ran against a non-mutating host config.

Source

Thrown at packages/react-reconciler/src/ReactFiberConfigWithNoMutation.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 mutation
// can re-export everything from this module.

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

// Mutation (when unsupported)
export const supportsMutation = false;
export const cloneMutableInstance = shim;
export const cloneMutableTextInstance = shim;
export const appendChild = shim;
export const appendChildToContainer = shim;
export const commitTextUpdate = shim;
export const commitMount = shim;
export const commitUpdate = shim;
export const insertBefore = shim;
export const insertInContainerBefore = shim;
export const removeChild = shim;

View on GitHub (pinned to eafeac097b)

Solutions

  1. Implement the mutation methods in your host config (appendChild, commitUpdate, removeChild, ...) matching your target.
  2. If your renderer is persistent, make sure you use the persistence commit path and implement the persistence hooks instead.
  3. Double-check which host config your build actually resolves (aliases, jest moduleNameMapper) — a wrong alias is a common cause.

Example fix

// before: no mutation support
export * from 'react-reconciler/src/ReactFiberConfigWithNoMutation';

// after: implement the methods your target needs
export const supportsMutation = true;
export function appendChild(parent, child) {
  parent.children.push(child);
}
export function removeChild(parent, child) {
  parent.children = parent.children.filter(c => c !== child);
}
Defensive patterns

Strategy: validation

Validate before calling

// Renderer smoke test: run one mount+update+unmount per config before shipping
const root = ReactReconcilerReconciler.createContainer(container, 0, null, false, null);
ReactReconcilerReconciler.updateContainer(<App />, root, null, null); // throws early if shims are wired in

Prevention

When it happens

Trigger: A container is committed in mutation mode while the resolved host config re-exports NoMutation — e.g. a custom renderer built from a no-mutation config (persistent or test-style renderer) whose root is driven through the default mutation commit path.

Common situations: Custom renderer authors (react-nil-style renderers, PDF/canvas targets) re-exporting the no-mutation shim without providing their own commit implementation; or miswired configs where the wrong host config got aliased.

Related errors


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