Home / Function/ hydrateBooleanishAttribute() — react Function Reference

hydrateBooleanishAttribute() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  e88b4fe5_6838_d36b_0e11_fd1a074c3de7["hydrateBooleanishAttribute()"]
  1e990658_7cea_75be_1f24_2399bdf9f15b["ReactDOMComponent.js"]
  e88b4fe5_6838_d36b_0e11_fd1a074c3de7 -->|defined in| 1e990658_7cea_75be_1f24_2399bdf9f15b
  409bfd4f_a0a2_7b82_31de_9321ab006da0["diffHydratedGenericElement()"]
  409bfd4f_a0a2_7b82_31de_9321ab006da0 -->|calls| e88b4fe5_6838_d36b_0e11_fd1a074c3de7
  befb3c8a_925e_b969_cf38_442509b5162d["warnForPropDifference()"]
  e88b4fe5_6838_d36b_0e11_fd1a074c3de7 -->|calls| befb3c8a_925e_b969_cf38_442509b5162d
  style e88b4fe5_6838_d36b_0e11_fd1a074c3de7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/client/ReactDOMComponent.js lines 2218–2256

function hydrateBooleanishAttribute(
  domElement: Element,
  propKey: string,
  attributeName: string,
  value: any,
  extraAttributes: Set<string>,
  serverDifferences: {[propName: string]: mixed},
): void {
  extraAttributes.delete(attributeName);
  const serverValue = domElement.getAttribute(attributeName);
  if (serverValue === null) {
    switch (typeof value) {
      case 'undefined':
      case 'function':
      case 'symbol':
        return;
    }
  } else {
    if (value == null) {
      // We had an attribute but shouldn't have had one, so read it
      // for the error message.
    } else {
      switch (typeof value) {
        case 'function':
        case 'symbol':
          break;
        default: {
          if (__DEV__) {
            checkAttributeStringCoercion(value, attributeName);
          }
          if (serverValue === '' + (value: any)) {
            return;
          }
        }
      }
    }
  }
  warnForPropDifference(propKey, serverValue, value, serverDifferences);
}

Domain

Subdomains

Frequently Asked Questions

What does hydrateBooleanishAttribute() do?
hydrateBooleanishAttribute() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js.
Where is hydrateBooleanishAttribute() defined?
hydrateBooleanishAttribute() is defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js at line 2218.
What does hydrateBooleanishAttribute() call?
hydrateBooleanishAttribute() calls 1 function(s): warnForPropDifference.
What calls hydrateBooleanishAttribute()?
hydrateBooleanishAttribute() is called by 1 function(s): diffHydratedGenericElement.

Analyze Your Own Codebase

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

Try Supermodel Free