Home / Function/ getDataFromCustomEvent() — react Function Reference

getDataFromCustomEvent() — react Function Reference

Architecture documentation for the getDataFromCustomEvent() function in BeforeInputEventPlugin.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  7b0dfa25_61f3_d05d_f416_c1f977953bf8["getDataFromCustomEvent()"]
  a235366c_1abe_162c_b9bf_7fbbfb597584["BeforeInputEventPlugin.js"]
  7b0dfa25_61f3_d05d_f416_c1f977953bf8 -->|defined in| a235366c_1abe_162c_b9bf_7fbbfb597584
  86643861_8bb8_470a_be1c_fd6ca6b189a3["extractCompositionEvent()"]
  86643861_8bb8_470a_be1c_fd6ca6b189a3 -->|calls| 7b0dfa25_61f3_d05d_f416_c1f977953bf8
  2c8561d4_b5f4_5116_1092_d5867919739f["getNativeBeforeInputChars()"]
  2c8561d4_b5f4_5116_1092_d5867919739f -->|calls| 7b0dfa25_61f3_d05d_f416_c1f977953bf8
  style 7b0dfa25_61f3_d05d_f416_c1f977953bf8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/events/plugins/BeforeInputEventPlugin.js lines 166–172

function getDataFromCustomEvent(nativeEvent: any) {
  const detail = nativeEvent.detail;
  if (typeof detail === 'object' && 'data' in detail) {
    return detail.data;
  }
  return null;
}

Domain

Subdomains

Frequently Asked Questions

What does getDataFromCustomEvent() do?
getDataFromCustomEvent() is a function in the react codebase, defined in packages/react-dom-bindings/src/events/plugins/BeforeInputEventPlugin.js.
Where is getDataFromCustomEvent() defined?
getDataFromCustomEvent() is defined in packages/react-dom-bindings/src/events/plugins/BeforeInputEventPlugin.js at line 166.
What calls getDataFromCustomEvent()?
getDataFromCustomEvent() is called by 2 function(s): extractCompositionEvent, getNativeBeforeInputChars.

Analyze Your Own Codebase

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

Try Supermodel Free