{"record":{"id":"e847bc256534e458","repo":"facebook/react","slug":"521","errorCode":"521","errorMessage":"flushSyncWork should not be called from builds that support legacy mode. This is a bug in React.","messagePattern":"flushSyncWork should not be called from builds that support legacy mode\\. This is a bug in React\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js","lineNumber":5094,"sourceCode":"  r: requestFormReset,\n  D /* prefetchDNS */: prefetchDNS,\n  C /* preconnect */: preconnect,\n  L /* preload */: preload,\n  m /* preloadModule */: preloadModule,\n  X /* preinitScript */: preinitScript,\n  S /* preinitStyle */: preinitStyle,\n  M /* preinitModuleScript */: preinitModuleScript,\n};\n\nfunction flushSyncWork() {\n  if (disableLegacyMode) {\n    const previousWasRendering = previousDispatcher.f(); /* flushSyncWork */\n    const wasRendering = flushSyncWorkOnAllRoots();\n    // Since multiple dispatchers can flush sync work during a single flushSync call\n    // we need to return true if any of them were rendering.\n    return previousWasRendering || wasRendering;\n  } else {\n    throw new Error(\n      'flushSyncWork should not be called from builds that support legacy mode. This is a bug in React.',\n    );\n  }\n}\n\nfunction requestFormReset(form: HTMLFormElement) {\n  const formInst = getInstanceFromNodeDOMTree(form);\n  if (\n    formInst !== null &&\n    formInst.tag === HostComponent &&\n    formInst.type === 'form'\n  ) {\n    requestFormResetOnFiber(formInst);\n  } else {\n    // This form was either not rendered by this React renderer (or it's an\n    // invalid type). Try the next one.\n    //\n    // The last implementation in the sequence will throw an error.","sourceCodeStart":5076,"sourceCodeEnd":5112,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js#L5076-L5112","documentation":"Error \"flushSyncWork should not be called from builds that support legacy mode. This is a bug in React.\" thrown in facebook/react.","triggerScenarios":"Thrown at packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js:5094 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}