facebook/react · error · Error
95
95
Error message
processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.
What it means
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.
Source
Thrown at packages/react-native-renderer/src/legacy-events/EventBatching.js:59
events: Array<ReactSyntheticEvent> | ReactSyntheticEvent | null,
) {
if (events !== null) {
eventQueue = accumulateInto(eventQueue, events);
}
// Set `eventQueue` to null before processing it so that we can tell if more
// events get enqueued while processing.
const processingEventQueue = eventQueue;
eventQueue = null;
if (!processingEventQueue) {
return;
}
forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
if (eventQueue) {
throw new Error(
'processEventQueue(): Additional events were enqueued while processing ' +
'an event queue. Support for this has not yet been implemented.',
);
}
// This would be a good time to rethrow if any of the event handlers threw.
rethrowCaughtError();
}
View on GitHub (pinned to eafeac097b)
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.
Example fix
// before
function onPress() {
inputRef.current.focus(); // native may dispatch focus synchronously
}
// after
function onPress() {
requestAnimationFrame(() => inputRef.current.focus());
} Defensive patterns
Strategy: fallback
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/204bc732fefaeacb.
Report an issue: GitHub.