hydrateBooleanAttribute() — react Function Reference
Architecture documentation for the hydrateBooleanAttribute() function in ReactDOMComponent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f3d3e586_5458_0eba_fd59_49b6a40ff86b["hydrateBooleanAttribute()"] 1e990658_7cea_75be_1f24_2399bdf9f15b["ReactDOMComponent.js"] f3d3e586_5458_0eba_fd59_49b6a40ff86b -->|defined in| 1e990658_7cea_75be_1f24_2399bdf9f15b 409bfd4f_a0a2_7b82_31de_9321ab006da0["diffHydratedGenericElement()"] 409bfd4f_a0a2_7b82_31de_9321ab006da0 -->|calls| f3d3e586_5458_0eba_fd59_49b6a40ff86b befb3c8a_925e_b969_cf38_442509b5162d["warnForPropDifference()"] f3d3e586_5458_0eba_fd59_49b6a40ff86b -->|calls| befb3c8a_925e_b969_cf38_442509b5162d style f3d3e586_5458_0eba_fd59_49b6a40ff86b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/client/ReactDOMComponent.js lines 2132–2167
function hydrateBooleanAttribute(
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 'function':
case 'symbol':
return;
}
if (!value) {
return;
}
} else {
switch (typeof value) {
case 'function':
case 'symbol':
break;
default: {
if (value) {
// If this was a boolean, it doesn't matter what the value is
// the fact that we have it is the same as the expected.
// As long as it's positive.
return;
}
}
}
}
warnForPropDifference(propKey, serverValue, value, serverDifferences);
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does hydrateBooleanAttribute() do?
hydrateBooleanAttribute() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js.
Where is hydrateBooleanAttribute() defined?
hydrateBooleanAttribute() is defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js at line 2132.
What does hydrateBooleanAttribute() call?
hydrateBooleanAttribute() calls 1 function(s): warnForPropDifference.
What calls hydrateBooleanAttribute()?
hydrateBooleanAttribute() 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