facebook/react · error · Error

343

343

Error message

ReactDOMServer does not yet support scope components.

What it means

Scope components (the experimental React Scope API, REACT_SCOPE_TYPE) pass through in Fizz only when the enableScopeAPI flag is on; the flag just renders their children. On a build without the flag, rendering a scope element during SSR throws error code 343.

Source

Thrown at packages/react-server/src/ReactFizzServer.js:3124

    }
    // $FlowFixMe[invalid-compare]
    case REACT_VIEW_TRANSITION_TYPE: {
      if (enableViewTransition) {
        renderViewTransition(request, task, keyPath, props);
        return;
      }
      // Fallthrough
    }
    // $FlowFixMe[invalid-compare]
    case REACT_SCOPE_TYPE: {
      if (enableScopeAPI) {
        const prevKeyPath = task.keyPath;
        task.keyPath = keyPath;
        renderNodeDestructive(request, task, props.children, -1);
        task.keyPath = prevKeyPath;
        return;
      }
      throw new Error('ReactDOMServer does not yet support scope components.');
    }
    // $FlowFixMe[invalid-compare]
    case REACT_SUSPENSE_TYPE: {
      renderSuspenseBoundary(request, task, keyPath, props);
      return;
    }
  }

  // $FlowFixMe[invalid-compare]
  if (typeof type === 'object' && type !== null) {
    switch (type.$$typeof) {
      // $FlowFixMe[invalid-compare]
      case REACT_FORWARD_REF_TYPE: {
        renderForwardRef(request, task, keyPath, type, props, ref);
        return;
      }
      // $FlowFixMe[invalid-compare]
      case REACT_MEMO_TYPE: {

View on GitHub (pinned to eafeac097b)

Solutions

  1. Remove the scope component from trees that are server rendered
  2. Use a React build/channel where the scope flag is enabled (experimental channel)
  3. Identify and update or replace the dependency that emits the scope element type

Example fix

// before
// <unstable_Scope>{children}</unstable_Scope> rendered during SSR on a stable build

// after
return <>{children}</>; // drop the scope wrapper for SSR
Defensive patterns

Strategy: fallback

Validate before calling

const isScopeElement = (type) =>
  typeof type === 'object' && type !== null && type.$$typeof === Symbol.for('react.scope');
// skip or replace scope elements before passing trees to a static SSR renderer

Prevention

When it happens

Trigger: Rendering an experimental scope element (unstable_Scope) or a tree containing one during SSR on a stable-channel build or a custom build where enableScopeAPI is false.

Common situations: Trying experimental React DOM features on the stable channel; a dependency importing scope internals; bundling canary-only code against a stable react-dom.

Related errors


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