hydrateSanitizedAttribute() — react Function Reference
Architecture documentation for the hydrateSanitizedAttribute() function in ReactDOMComponent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD d26613be_511f_ca92_6515_bce3e82633a6["hydrateSanitizedAttribute()"] 1e990658_7cea_75be_1f24_2399bdf9f15b["ReactDOMComponent.js"] d26613be_511f_ca92_6515_bce3e82633a6 -->|defined in| 1e990658_7cea_75be_1f24_2399bdf9f15b 409bfd4f_a0a2_7b82_31de_9321ab006da0["diffHydratedGenericElement()"] 409bfd4f_a0a2_7b82_31de_9321ab006da0 -->|calls| d26613be_511f_ca92_6515_bce3e82633a6 befb3c8a_925e_b969_cf38_442509b5162d["warnForPropDifference()"] d26613be_511f_ca92_6515_bce3e82633a6 -->|calls| befb3c8a_925e_b969_cf38_442509b5162d style d26613be_511f_ca92_6515_bce3e82633a6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/client/ReactDOMComponent.js lines 2360–2401
function hydrateSanitizedAttribute(
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;
}
} 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 (__DEV__) {
checkAttributeStringCoercion(value, propKey);
}
const sanitizedValue = sanitizeURL('' + value);
if (serverValue === sanitizedValue) {
return;
}
}
}
}
}
warnForPropDifference(propKey, serverValue, value, serverDifferences);
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does hydrateSanitizedAttribute() do?
hydrateSanitizedAttribute() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js.
Where is hydrateSanitizedAttribute() defined?
hydrateSanitizedAttribute() is defined in packages/react-dom-bindings/src/client/ReactDOMComponent.js at line 2360.
What does hydrateSanitizedAttribute() call?
hydrateSanitizedAttribute() calls 1 function(s): warnForPropDifference.
What calls hydrateSanitizedAttribute()?
hydrateSanitizedAttribute() 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