{"record":{"id":"204bc732fefaeacb","repo":"facebook/react","slug":"95","errorCode":"95","errorMessage":"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.","messagePattern":"processEventQueue\\(\\): Additional events were enqueued while processing an event queue\\. Support for this has not yet been implemented\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-native-renderer/src/legacy-events/EventBatching.js","lineNumber":59,"sourceCode":"  events: Array<ReactSyntheticEvent> | ReactSyntheticEvent | null,\n) {\n  if (events !== null) {\n    eventQueue = accumulateInto(eventQueue, events);\n  }\n\n  // Set `eventQueue` to null before processing it so that we can tell if more\n  // events get enqueued while processing.\n  const processingEventQueue = eventQueue;\n  eventQueue = null;\n\n  if (!processingEventQueue) {\n    return;\n  }\n\n  forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n\n  if (eventQueue) {\n    throw new Error(\n      'processEventQueue(): Additional events were enqueued while processing ' +\n        'an event queue. Support for this has not yet been implemented.',\n    );\n  }\n\n  // This would be a good time to rethrow if any of the event handlers threw.\n  rethrowCaughtError();\n}\n","sourceCodeStart":41,"sourceCodeEnd":68,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-native-renderer/src/legacy-events/EventBatching.js#L41-L68","documentation":"RN's legacy EventBatching drains the event queue by nulling it first, dispatching all accumulated events, then asserting that nothing was enqueued re-entrantly; React's legacy event system cannot process events added while a queue is mid-flight, so it throws instead of dropping or deferring them.","triggerScenarios":"An event handler (or its synchronous side effects) causes another native event dispatch that goes through enqueueEvents while the previous queue is still being processed - e.g. a handler that focuses or scrolls and the native side dispatches focus/scroll back synchronously.","commonSituations":"Rare; appears after native-side changes that dispatch events synchronously in response to JS-driven UI mutations; autofocusing inputs during event handling; custom native components emitting layout events triggered by handlers.","solutions":["Defer the side effect that triggers the nested dispatch: wrap it in setTimeout(0), requestAnimationFrame, or queueMicrotask so it runs after the queue drains.","Update react-native - this lives in legacy-events internals that newer RN releases handle differently.","If it persists, reproduce and report the event pair involved (handler -> resulting native event) to the RN/React maintainers."],"exampleFix":"// before\nfunction onPress() {\n  inputRef.current.focus(); // native may dispatch focus synchronously\n}\n\n// after\nfunction onPress() {\n  requestAnimationFrame(() => inputRef.current.focus());\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Defer side effects that can trigger nested native dispatches (focus, scroll) via rAF or setTimeout(0).","Avoid custom native components that emit events synchronously in response to handler-driven mutations.","Keep react-native current - this is legacy-events internals that newer releases handle differently."],"tags":["react-native","legacy-events","event-batching","reentrancy"],"backgroundTag":"reentrant-event-dispatch","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}