Home / Function/ executeDispatchesInOrder() — react Function Reference

executeDispatchesInOrder() — react Function Reference

Architecture documentation for the executeDispatchesInOrder() function in EventPluginUtils.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  220a1380_3b15_b89d_5bbb_e6ffc9e2727a["executeDispatchesInOrder()"]
  c47175ea_4123_c4e5_c30d_de7506f00f3a["EventPluginUtils.js"]
  220a1380_3b15_b89d_5bbb_e6ffc9e2727a -->|defined in| c47175ea_4123_c4e5_c30d_de7506f00f3a
  0a28fde5_6dbd_e9c8_739e_8a83da0adf85["executeDispatchesAndRelease()"]
  0a28fde5_6dbd_e9c8_739e_8a83da0adf85 -->|calls| 220a1380_3b15_b89d_5bbb_e6ffc9e2727a
  92e5bd6b_559e_70c8_cde0_8c69f4e5a6ec["validateEventDispatches()"]
  220a1380_3b15_b89d_5bbb_e6ffc9e2727a -->|calls| 92e5bd6b_559e_70c8_cde0_8c69f4e5a6ec
  d6f65e02_92ed_58e5_72e8_ea3dcb7d3e20["executeDispatch()"]
  220a1380_3b15_b89d_5bbb_e6ffc9e2727a -->|calls| d6f65e02_92ed_58e5_72e8_ea3dcb7d3e20
  style 220a1380_3b15_b89d_5bbb_e6ffc9e2727a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/legacy-events/EventPluginUtils.js lines 86–117

export function executeDispatchesInOrder(event) {
  const dispatchListeners = event._dispatchListeners;
  const dispatchInstances = event._dispatchInstances;
  if (__DEV__) {
    validateEventDispatches(event);
  }
  if (isArray(dispatchListeners)) {
    for (let i = 0; i < dispatchListeners.length; i++) {
      if (event.isPropagationStopped()) {
        break;
      }
      // Listeners and Instances are two parallel arrays that are always in sync.
      const listener = dispatchListeners[i];
      const instance = dispatchInstances[i];
      if (__DEV__ && instance !== null) {
        runWithFiberInDEV(instance, executeDispatch, event, listener, instance);
      } else {
        executeDispatch(event, listener, instance);
      }
    }
  } else if (dispatchListeners) {
    const listener = dispatchListeners;
    const instance = dispatchInstances;
    if (__DEV__ && instance !== null) {
      runWithFiberInDEV(instance, executeDispatch, event, listener, instance);
    } else {
      executeDispatch(event, listener, instance);
    }
  }
  event._dispatchListeners = null;
  event._dispatchInstances = null;
}

Domain

Subdomains

Frequently Asked Questions

What does executeDispatchesInOrder() do?
executeDispatchesInOrder() is a function in the react codebase, defined in packages/react-native-renderer/src/legacy-events/EventPluginUtils.js.
Where is executeDispatchesInOrder() defined?
executeDispatchesInOrder() is defined in packages/react-native-renderer/src/legacy-events/EventPluginUtils.js at line 86.
What does executeDispatchesInOrder() call?
executeDispatchesInOrder() calls 2 function(s): executeDispatch, validateEventDispatches.
What calls executeDispatchesInOrder()?
executeDispatchesInOrder() is called by 1 function(s): executeDispatchesAndRelease.

Analyze Your Own Codebase

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

Try Supermodel Free