facebook/react · error · Error

React form unexpectedly submitted.

Error message

React form unexpectedly submitted.

What it means

Error "React form unexpectedly submitted." thrown in facebook/react.

Source

Thrown at packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js:1393

      attributeAssign,
      stringToChunk(escapeTextForBrowser(value)),
      attributeEnd,
    );
  }
}

function makeFormFieldPrefix(resumableState: ResumableState): string {
  // TODO: Make this deterministic.
  const id = resumableState.nextFormID++;
  return resumableState.idPrefix + id;
}

// Since this will likely be repeated a lot in the HTML, we use a more concise message
// than on the client and hopefully it's googleable.
const actionJavaScriptURL = stringToPrecomputedChunk(
  escapeTextForBrowser(
    // eslint-disable-next-line no-script-url
    "javascript:throw new Error('React form unexpectedly submitted.')",
  ),
);

const startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');

function pushAdditionalFormField(
  this: Array<Chunk | PrecomputedChunk>,
  value: string | File,
  key: string,
): void {
  const target: Array<Chunk | PrecomputedChunk> = this;
  target.push(startHiddenInputChunk);
  validateAdditionalFormField(value, key);
  pushStringAttribute(target, 'name', key);
  pushStringAttribute(target, 'value', value);
  target.push(endOfStartTagSelfClosing);
}

View on GitHub (pinned to eafeac097b)

When it happens

Trigger: Thrown at packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js:1393 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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