facebook/react · warning

Detected a large number of updates inside startTransition. I

Error message

Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.

What it means

Dev-only warning emitted from runActionStateAction (ReactFiberHooks.js:2250), the queue that replays useActionState actions that were dispatched inside a transition. While a transition is active on ReactSharedInternals.T, every fiber that schedules an update is added to the transition's _updatedFibers set (ReactFiberWorkLoop.js:849). When the outermost action-transition finishes and that set holds more than 10 distinct fibers, React warns: this pattern usually means a subscription is driving updates, and updates React did not plan for cannot be interrupted or time-sliced.

Source

Thrown at packages/react-reconciler/src/ReactFiberHooks.js:2250

          ) {
            // Just assert that assumption holds that we're not overriding anything.
            console.error(
              'We expected inner Transitions to have transferred the outer types set and ' +
                'that you cannot add to the outer Transition while inside the inner.' +
                'This is a bug in React.',
            );
          }
        }
        prevTransition.types = currentTransition.types;
      }
      ReactSharedInternals.T = prevTransition;

      if (__DEV__) {
        if (prevTransition === null && currentTransition._updatedFibers) {
          const updatedFibersCount = currentTransition._updatedFibers.size;
          currentTransition._updatedFibers.clear();
          if (updatedFibersCount > 10) {
            console.warn(
              'Detected a large number of updates inside startTransition. ' +
                'If this is due to a subscription please re-write it to use React provided hooks. ' +
                'Otherwise concurrent mode guarantees are off the table.',
            );
          }
        }
      }
    }
  } else {
    // The original dispatch was not part of a transition.
    try {
      const returnValue = action(prevState, payload);
      handleActionReturnValue(actionQueue, node, returnValue);
    } catch (error) {
      onActionError(actionQueue, node, error);
    }
  }
}

View on GitHub (pinned to eafeac097b)

Solutions

  1. Rewrite the subscription with useSyncExternalStore so React owns scheduling and dedupes updates
  2. Batch the fan-out: compute one result inside the transition and call a single setState/dispatch instead of one per component
  3. Move subscription-driven updates outside startTransition; external-store notifications are meant to be sync
  4. If more than 10 updates on distinct components is intentional, accept the dev warning - it flags degraded interruption guarantees, not a crash

Example fix

// before: subscription fans out inside a transition
store.subscribe(() => {
  startTransition(() => {
    listeners.forEach(l => l.forceUpdate()); // >10 fibers updated
  });
});

// after: React owns the subscription
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot);
Defensive patterns

Strategy: validation

Validate before calling

// Dev guard: count updates your code triggers inside one action/transition
let fanOut = 0;
const track = (dispatch) => (...args) => { fanOut++; return dispatch(...args); };

startTransition(() => {
  fanOut = 0;
  dispatchAction(track(setA), track(setB), track(setC));
  if (fanOut > 10) {
    console.warn('Transition fan-out > 10 fibers - rewrite as useSyncExternalStore or batch');
  }
});

Prevention

When it happens

Trigger: A useActionState/form action dispatched inside startTransition or useTransition whose execution schedules updates on more than 10 distinct fibers: calling setState on many components in a loop, an external-store subscription callback (Redux/Zustand/MobX) firing inside the action, or one dispatch whose reducer fans out to per-component states.

Common situations: Wrapping store subscription handlers or event-bus callbacks in startTransition; React 18-to-19 migrations where actions update a dozen widgets; a useEffect subscribed to a mutable store calling wrapped setState inside a transition.

Related errors


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