Home / Function/ processEventTypes() — react Function Reference

processEventTypes() — react Function Reference

Architecture documentation for the processEventTypes() function in ReactNativeViewConfigRegistry.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  257049b8_1432_72ee_a343_11242af06f3e["processEventTypes()"]
  ebe8ca64_7d82_b4be_9f95_3fe24b614979["ReactNativeViewConfigRegistry.js"]
  257049b8_1432_72ee_a343_11242af06f3e -->|defined in| ebe8ca64_7d82_b4be_9f95_3fe24b614979
  style 257049b8_1432_72ee_a343_11242af06f3e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ReactNativeViewConfigRegistry.js lines 21–52

function processEventTypes(viewConfig: ViewConfig): void {
  const {bubblingEventTypes, directEventTypes} = viewConfig;

  if (__DEV__) {
    if (bubblingEventTypes != null && directEventTypes != null) {
      for (const topLevelType in directEventTypes) {
        if (bubblingEventTypes[topLevelType] != null) {
          throw new Error(
            `Event cannot be both direct and bubbling: ${topLevelType}`,
          );
        }
      }
    }
  }

  if (bubblingEventTypes != null) {
    for (const topLevelType in bubblingEventTypes) {
      if (customBubblingEventTypes[topLevelType] == null) {
        customBubblingEventTypes[topLevelType] =
          bubblingEventTypes[topLevelType];
      }
    }
  }

  if (directEventTypes != null) {
    for (const topLevelType in directEventTypes) {
      if (customDirectEventTypes[topLevelType] == null) {
        customDirectEventTypes[topLevelType] = directEventTypes[topLevelType];
      }
    }
  }
}

Domain

Subdomains

Frequently Asked Questions

What does processEventTypes() do?
processEventTypes() is a function in the react codebase, defined in packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ReactNativeViewConfigRegistry.js.
Where is processEventTypes() defined?
processEventTypes() is defined in packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/ReactNativeViewConfigRegistry.js at line 21.

Analyze Your Own Codebase

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

Try Supermodel Free