{"record":{"id":"a9ead1ce97b305a8","repo":"facebook/react","slug":"476","errorCode":"476","errorMessage":"Expected the form instance to be a HostComponent. This is a bug in React.","messagePattern":"Expected the form instance to be a HostComponent\\. This is a bug in React\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberHooks.js","lineNumber":3273,"sourceCode":"              'If this is due to a subscription please re-write it to use React provided hooks. ' +\n              'Otherwise concurrent mode guarantees are off the table.',\n          );\n        }\n      }\n    }\n  }\n}\n\nconst noop = () => {};\n\nexport function startHostTransition<F>(\n  formFiber: Fiber,\n  pendingState: TransitionStatus,\n  action: (F => mixed) | null,\n  formData: F,\n): void {\n  if (formFiber.tag !== HostComponent) {\n    throw new Error(\n      'Expected the form instance to be a HostComponent. This ' +\n        'is a bug in React.',\n    );\n  }\n\n  const stateHook = ensureFormComponentIsStateful(formFiber);\n\n  const queue: UpdateQueue<\n    Thenable<TransitionStatus> | TransitionStatus,\n    BasicStateAction<Thenable<TransitionStatus> | TransitionStatus>,\n  > = stateHook.queue;\n\n  startHostActionTimer(formFiber);\n\n  startTransition(\n    formFiber,\n    queue,\n    pendingState,","sourceCodeStart":3255,"sourceCodeEnd":3291,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberHooks.js#L3255-L3291","documentation":"startHostTransition is the reconciler entry react-dom uses when a host <form> starts an action transition (form action={fn} submit, or the reset/submit plumbing behind React-controlled forms). Its contract is that the fiber passed in is a host component; a fiber with any other tag violates that contract, and React reports it as an internal bug rather than a user error.","triggerScenarios":"The form-action machinery is invoked with a fiber whose tag is not HostComponent — typically from version-skewed react-dom calling a mismatched reconciler, or a custom renderer/wrapper reaching into requestFormReset/startHostTransition for a non-DOM element.","commonSituations":"Installing react and react-dom from different releases (or duplicated copies resolving differently); forks/custom renderers reusing form-action internals; experimental builds where the form-action protocol changed between packages.","solutions":["Make react and react-dom resolve to the exact same version (check the lockfile and dedupe)","File an issue with the <form action> repro if versions already match","Audit any custom renderer or library calling startHostTransition/requestFormReset directly","Reproduce on stable React to confirm it is an experimental-integration issue"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Internal invariant on the form-action path: boundary keeps the rest of the app usable\n<ErrorBoundary fallback={<PlainFormWithoutAction/>} onError={(e, info) => fileIssueWithVersions(e, info)}>\n  <FormWithServerAction />\n</ErrorBoundary>","preventionTips":["Install react and react-dom as exact-matching versions and dedupe the lockfile","Do not call form-action internals (requestFormReset/startHostTransition) from custom renderer code","Test form action={fn} flows after every React upgrade","Keep a working plain onSubmit fallback while form actions are adopted"],"tags":["react","forms","form-actions","invariant","internal-bug"],"backgroundTag":"library-invariant-violation","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}