Home / Function/ oneEventLoopTestConfig() — react Function Reference

oneEventLoopTestConfig() — react Function Reference

Architecture documentation for the oneEventLoopTestConfig() function in ResponderEventPlugin-test.internal.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  55c2747f_f319_fea7_a514_417774a94797["oneEventLoopTestConfig()"]
  51a704bf_9ecd_8c0a_35b5_9021d42bc06c["ResponderEventPlugin-test.internal.js"]
  55c2747f_f319_fea7_a514_417774a94797 -->|defined in| 51a704bf_9ecd_8c0a_35b5_9021d42bc06c
  style 55c2747f_f319_fea7_a514_417774a94797 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-native-renderer/src/__tests__/ResponderEventPlugin-test.internal.js lines 184–225

const oneEventLoopTestConfig = function (readableIDToID) {
  const ret = {
    // Negotiation
    scrollShouldSetResponder: {bubbled: {}, captured: {}},
    startShouldSetResponder: {bubbled: {}, captured: {}},
    moveShouldSetResponder: {bubbled: {}, captured: {}},
    responderTerminationRequest: {},

    // Non-negotiation
    responderReject: {}, // These do not bubble capture.
    responderGrant: {},
    responderStart: {},
    responderMove: {},
    responderTerminate: {},
    responderEnd: {},
    responderRelease: {},
  };
  for (const eventName in ret) {
    for (const readableNodeName in readableIDToID) {
      if (ret[eventName].bubbled) {
        // Two phase
        ret[eventName].bubbled[readableNodeName] = {
          order: NA,
          assertEvent: null,
          returnVal: undefined,
        };
        ret[eventName].captured[readableNodeName] = {
          order: NA,
          assertEvent: null,
          returnVal: undefined,
        };
      } else {
        ret[eventName][readableNodeName] = {
          order: NA,
          assertEvent: null,
          returnVal: undefined,
        };
      }
    }
  }
  return ret;
};

Domain

Subdomains

Frequently Asked Questions

What does oneEventLoopTestConfig() do?
oneEventLoopTestConfig() is a function in the react codebase, defined in packages/react-native-renderer/src/__tests__/ResponderEventPlugin-test.internal.js.
Where is oneEventLoopTestConfig() defined?
oneEventLoopTestConfig() is defined in packages/react-native-renderer/src/__tests__/ResponderEventPlugin-test.internal.js at line 184.

Analyze Your Own Codebase

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

Try Supermodel Free