Home / Function/ modifierStateGetter() — react Function Reference

modifierStateGetter() — react Function Reference

Architecture documentation for the modifierStateGetter() function in SyntheticEvent.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  55f1883a_e638_37c3_a176_f69dae6003e7["modifierStateGetter()"]
  9c3d71d9_41af_c5e7_cd35_d25bbf6cf606["SyntheticEvent.js"]
  55f1883a_e638_37c3_a176_f69dae6003e7 -->|defined in| 9c3d71d9_41af_c5e7_cd35_d25bbf6cf606
  style 55f1883a_e638_37c3_a176_f69dae6003e7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/events/SyntheticEvent.js lines 427–435

function modifierStateGetter(keyArg) {
  const syntheticEvent = this;
  const nativeEvent = syntheticEvent.nativeEvent;
  if (nativeEvent.getModifierState) {
    return nativeEvent.getModifierState(keyArg);
  }
  const keyProp = modifierKeyToProp[keyArg];
  return keyProp ? !!nativeEvent[keyProp] : false;
}

Domain

Subdomains

Frequently Asked Questions

What does modifierStateGetter() do?
modifierStateGetter() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/SyntheticEvent.js.
Where is modifierStateGetter() defined?
modifierStateGetter() is defined in packages/react-dom-bindings/src/events/SyntheticEvent.js at line 427.

Analyze Your Own Codebase

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

Try Supermodel Free