Home / File/ ResponderEventPlugin.js — react Source File

ResponderEventPlugin.js — react Source File

Architecture documentation for ResponderEventPlugin.js, a javascript file in the react codebase. 14 imports, 3 dependents.

File javascript BabelCompiler Validation 14 imports 3 dependents 20 functions

Entity Profile

Dependency Diagram

graph LR
  674c6180_b91e_e17d_fb2d_40a6a3631bb3["ResponderEventPlugin.js"]
  c47175ea_4123_c4e5_c30d_de7506f00f3a["EventPluginUtils.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> c47175ea_4123_c4e5_c30d_de7506f00f3a
  87ca11ba_f1b0_34e6_deb2_620dc868ac55["executeDirectDispatch"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 87ca11ba_f1b0_34e6_deb2_620dc868ac55
  c0661814_ea11_4240_4b04_d01f8f70bd9a["hasDispatches"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> c0661814_ea11_4240_4b04_d01f8f70bd9a
  5c1bdf7c_1cc3_dfb2_4d64_5824b3570c9e["executeDispatchesInOrderStopAtTrue"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 5c1bdf7c_1cc3_dfb2_4d64_5824b3570c9e
  6212e25f_b3a3_8466_a790_e9a77ad55bf9["ResponderSyntheticEvent.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 6212e25f_b3a3_8466_a790_e9a77ad55bf9
  9ad2f0e1_d59b_817a_da0e_0e75838ea57c["ResponderTouchHistoryStore.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 9ad2f0e1_d59b_817a_da0e_0e75838ea57c
  700e509c_b4f0_81bd_4316_b918f7f693c3["accumulate.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 700e509c_b4f0_81bd_4316_b918f7f693c3
  286a851e_063c_46bb_a363_9c8b89aa0e3e["ResponderTopLevelEventTypes.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 286a851e_063c_46bb_a363_9c8b89aa0e3e
  60f92383_40f2_196e_b450_7c99b0331648["isStartish"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 60f92383_40f2_196e_b450_7c99b0331648
  d2f15c72_7981_85cf_294a_267ee76fc3ed["isMoveish"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> d2f15c72_7981_85cf_294a_267ee76fc3ed
  618ba80e_464a_e399_d48b_22dc1da5acb0["isEndish"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 618ba80e_464a_e399_d48b_22dc1da5acb0
  c55ef19d_ffff_0be0_ac25_e6d6c8520cd6["accumulateInto.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> c55ef19d_ffff_0be0_ac25_e6d6c8520cd6
  03d71d90_7e04_8406_8321_a1aeecb7fa15["forEachAccumulated.js"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> 03d71d90_7e04_8406_8321_a1aeecb7fa15
  f8f61929_42ba_4030_bc4f_a1c5484f5f32["ReactWorkTags"]
  674c6180_b91e_e17d_fb2d_40a6a3631bb3 --> f8f61929_42ba_4030_bc4f_a1c5484f5f32
  style 674c6180_b91e_e17d_fb2d_40a6a3631bb3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @noflow
 */

import {
  executeDirectDispatch,
  hasDispatches,
  executeDispatchesInOrderStopAtTrue,
  getInstanceFromNode,
  getFiberCurrentPropsFromNode,
} from './EventPluginUtils';
import ResponderSyntheticEvent from './ResponderSyntheticEvent';
import ResponderTouchHistoryStore from './ResponderTouchHistoryStore';
import accumulate from './accumulate';
import {
  TOP_SCROLL,
  TOP_SELECTION_CHANGE,
  TOP_TOUCH_CANCEL,
  isStartish,
  isMoveish,
  isEndish,
  startDependencies,
  moveDependencies,
  endDependencies,
} from './ResponderTopLevelEventTypes';
import accumulateInto from './accumulateInto';
import forEachAccumulated from './forEachAccumulated';
import {HostComponent} from 'react-reconciler/src/ReactWorkTags';

/**
 * Instance of element that should respond to touch/move types of interactions,
 * as indicated explicitly by relevant callbacks.
 */
let responderInst = null;

/**
 * Count of current touches. A textInput should become responder iff the
 * selection changes while there is a touch on the screen.
 */
let trackedTouchCount = 0;

function changeResponder(nextResponderInst, blockHostResponder) {
  const oldResponderInst = responderInst;
  responderInst = nextResponderInst;
  if (ResponderEventPlugin.GlobalResponderHandler !== null) {
    ResponderEventPlugin.GlobalResponderHandler.onChange(
      oldResponderInst,
      nextResponderInst,
      blockHostResponder,
    );
  }
}

const eventTypes = {
  /**
// ... (745 more lines)

Domain

Subdomains

Frequently Asked Questions

What does ResponderEventPlugin.js do?
ResponderEventPlugin.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ResponderEventPlugin.js?
ResponderEventPlugin.js defines 20 function(s): ResponderEventPlugin._getResponder, ResponderEventPlugin.extractEvents, accumulateDirectDispatches, accumulateDirectDispatchesSingle, accumulateDirectionalDispatches, accumulateDispatches, accumulateTwoPhaseDispatches, accumulateTwoPhaseDispatchesSingle, accumulateTwoPhaseDispatchesSingleSkipTarget, accumulateTwoPhaseDispatchesSkipTarget, and 10 more.
What does ResponderEventPlugin.js depend on?
ResponderEventPlugin.js imports 14 module(s): EventPluginUtils.js, ReactWorkTags, ResponderSyntheticEvent.js, ResponderTopLevelEventTypes.js, ResponderTouchHistoryStore.js, accumulate.js, accumulateInto.js, executeDirectDispatch, and 6 more.
What files import ResponderEventPlugin.js?
ResponderEventPlugin.js is imported by 3 file(s): ReactFabricInjection.js, ReactNativeInjection.js, ReactNativeInjectionShared.js.
Where is ResponderEventPlugin.js in the architecture?
ResponderEventPlugin.js is located at packages/react-native-renderer/src/legacy-events/ResponderEventPlugin.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-native-renderer/src/legacy-events).

Analyze Your Own Codebase

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

Try Supermodel Free