Home / Function/ processDispatchQueueItemsInOrder() — react Function Reference

processDispatchQueueItemsInOrder() — react Function Reference

Architecture documentation for the processDispatchQueueItemsInOrder() function in DOMPluginEventSystem.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ef042c23_e0ac_5fbc_c719_3d84aa06fd1f["processDispatchQueueItemsInOrder()"]
  816b54e5_c63c_f8b2_68e8_0c637e281f03["DOMPluginEventSystem.js"]
  ef042c23_e0ac_5fbc_c719_3d84aa06fd1f -->|defined in| 816b54e5_c63c_f8b2_68e8_0c637e281f03
  002516b7_f4cf_8780_7915_6ea2f2f06333["processDispatchQueue()"]
  002516b7_f4cf_8780_7915_6ea2f2f06333 -->|calls| ef042c23_e0ac_5fbc_c719_3d84aa06fd1f
  9e545439_ca71_6e3e_4757_35889b143bfc["executeDispatch()"]
  ef042c23_e0ac_5fbc_c719_3d84aa06fd1f -->|calls| 9e545439_ca71_6e3e_4757_35889b143bfc
  style ef042c23_e0ac_5fbc_c719_3d84aa06fd1f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/events/DOMPluginEventSystem.js lines 266–311

function processDispatchQueueItemsInOrder(
  event: ReactSyntheticEvent,
  dispatchListeners: Array<DispatchListener>,
  inCapturePhase: boolean,
): void {
  let previousInstance;
  if (inCapturePhase) {
    for (let i = dispatchListeners.length - 1; i >= 0; i--) {
      const {instance, currentTarget, listener} = dispatchListeners[i];
      if (instance !== previousInstance && event.isPropagationStopped()) {
        return;
      }
      if (__DEV__ && instance !== null) {
        runWithFiberInDEV(
          instance,
          executeDispatch,
          event,
          listener,
          currentTarget,
        );
      } else {
        executeDispatch(event, listener, currentTarget);
      }
      previousInstance = instance;
    }
  } else {
    for (let i = 0; i < dispatchListeners.length; i++) {
      const {instance, currentTarget, listener} = dispatchListeners[i];
      if (instance !== previousInstance && event.isPropagationStopped()) {
        return;
      }
      if (__DEV__ && instance !== null) {
        runWithFiberInDEV(
          instance,
          executeDispatch,
          event,
          listener,
          currentTarget,
        );
      } else {
        executeDispatch(event, listener, currentTarget);
      }
      previousInstance = instance;
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does processDispatchQueueItemsInOrder() do?
processDispatchQueueItemsInOrder() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/DOMPluginEventSystem.js.
Where is processDispatchQueueItemsInOrder() defined?
processDispatchQueueItemsInOrder() is defined in packages/react-dom-bindings/src/events/DOMPluginEventSystem.js at line 266.
What does processDispatchQueueItemsInOrder() call?
processDispatchQueueItemsInOrder() calls 1 function(s): executeDispatch.
What calls processDispatchQueueItemsInOrder()?
processDispatchQueueItemsInOrder() is called by 1 function(s): processDispatchQueue.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free