hydrateNumericAttribute() — react Function Reference
Architecture documentation for the hydrateNumericAttribute() function in ReactDOMComponent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3d159227_9c72_8676_0535_57810df5eb7f["hydrateNumericAttribute()"] 1e990658_7cea_75be_1f24_2399bdf9f15b["ReactDOMComponent.js"] 3d159227_9c72_8676_0535_57810df5eb7f -->|defined in| 1e990658_7cea_75be_1f24_2399bdf9f15b 409bfd4f_a0a2_7b82_31de_9321ab006da0["diffHydratedGenericElement()"] 409bfd4f_a0a2_7b82_31de_9321ab006da0 -->|calls| 3d159227_9c72_8676_0535_57810df5eb7f befb3c8a_925e_b969_cf38_442509b5162d["warnForPropDifference()"] 3d159227_9c72_8676_0535_57810df5eb7f -->|calls| befb3c8a_925e_b969_cf38_442509b5162d style 3d159227_9c72_8676_0535_57810df5eb7f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/client/ReactDOMComponent.js lines 2258–2307
function hydrateNumericAttribute(
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':
case 'boolean':
return;
default:
if (isNaN(value)) {
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':
case 'boolean':
break;
default: {
if (isNaN(value)) {
// We had an attribute but shouldn't have had one, so read it
// for the error message.
break;
}
if (__DEV__) {
checkAttributeStringCoercion(value, propKey);
}
if (serverValue === '' + value) {
return;
}
}
}
}
}
warnForPropDifference(propKey, serverValue, value, serverDifferences);
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does hydrateNumericAttribute() do?
hydrateNumericAttribute() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js.
Where is hydrateNumericAttribute() defined?
hydrateNumericAttribute() is defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js at line 2258.
What does hydrateNumericAttribute() call?
hydrateNumericAttribute() calls 1 function(s): warnForPropDifference.
What calls hydrateNumericAttribute()?
hydrateNumericAttribute() 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