Home / Function/ getPropNameFromAttributeName() — react Function Reference

getPropNameFromAttributeName() — react Function Reference

Architecture documentation for the getPropNameFromAttributeName() function in ReactDOMComponent.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  b5cfc303_8130_b696_4bd4_0f0ebf186511["getPropNameFromAttributeName()"]
  1e990658_7cea_75be_1f24_2399bdf9f15b["ReactDOMComponent.js"]
  b5cfc303_8130_b696_4bd4_0f0ebf186511 -->|defined in| 1e990658_7cea_75be_1f24_2399bdf9f15b
  255bc5ba_4119_c519_1a8a_dd9223b03b3e["warnForExtraAttributes()"]
  255bc5ba_4119_c519_1a8a_dd9223b03b3e -->|calls| b5cfc303_8130_b696_4bd4_0f0ebf186511
  789eed66_a594_0191_5d38_9148becc6758["getPropsFromElement()"]
  789eed66_a594_0191_5d38_9148becc6758 -->|calls| b5cfc303_8130_b696_4bd4_0f0ebf186511
  style b5cfc303_8130_b696_4bd4_0f0ebf186511 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/client/ReactDOMComponent.js lines 1994–2004

function getPropNameFromAttributeName(attrName: string): string {
  switch (attrName) {
    case 'class':
      return 'className';
    case 'for':
      return 'htmlFor';
    // TODO: The rest of the aliases.
    default:
      return attrName;
  }
}

Domain

Subdomains

Frequently Asked Questions

What does getPropNameFromAttributeName() do?
getPropNameFromAttributeName() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js.
Where is getPropNameFromAttributeName() defined?
getPropNameFromAttributeName() is defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js at line 1994.
What calls getPropNameFromAttributeName()?
getPropNameFromAttributeName() is called by 2 function(s): getPropsFromElement, warnForExtraAttributes.

Analyze Your Own Codebase

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

Try Supermodel Free