hydrateTextarea() — react Function Reference
Architecture documentation for the hydrateTextarea() function in ReactDOMTextarea.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3d79164b_d806_37c5_e525_c291e89fad30["hydrateTextarea()"] 8997a27a_fcfe_cfbe_fe0c_b8a92dc76e38["ReactDOMTextarea.js"] 3d79164b_d806_37c5_e525_c291e89fad30 -->|defined in| 8997a27a_fcfe_cfbe_fe0c_b8a92dc76e38 14e1dad9_019e_0b6b_45f9_989dc6db3084["toString()"] 3d79164b_d806_37c5_e525_c291e89fad30 -->|calls| 14e1dad9_019e_0b6b_45f9_989dc6db3084 7404ee30_0cd4_7886_2806_324f301962c4["getToStringValue()"] 3d79164b_d806_37c5_e525_c291e89fad30 -->|calls| 7404ee30_0cd4_7886_2806_324f301962c4 c5a0889b_7272_0f52_0356_e16d1c8072e4["trackHydrated()"] 3d79164b_d806_37c5_e525_c291e89fad30 -->|calls| c5a0889b_7272_0f52_0356_e16d1c8072e4 style 3d79164b_d806_37c5_e525_c291e89fad30 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/client/ReactDOMTextarea.js lines 150–173
export function hydrateTextarea(
element: Element,
value: ?string,
defaultValue: ?string,
): void {
const node: HTMLTextAreaElement = (element: any);
let initialValue = value;
if (initialValue == null) {
if (defaultValue == null) {
defaultValue = '';
}
initialValue = defaultValue;
}
// Track the value that we last observed which is the hydrated value so
// that any change event that fires will trigger onChange on the actual
// current value.
const stringValue = toString(getToStringValue(initialValue));
const changed = trackHydrated((node: any), stringValue, false);
if (changed) {
// If the current value is different, that suggests that the user
// changed it before hydration. Queue a replay of the change event.
queueChangeEvent(node);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does hydrateTextarea() do?
hydrateTextarea() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/ReactDOMTextarea.js.
Where is hydrateTextarea() defined?
hydrateTextarea() is defined in packages/react-dom-bindings/src/client/ReactDOMTextarea.js at line 150.
What does hydrateTextarea() call?
hydrateTextarea() calls 3 function(s): getToStringValue, toString, trackHydrated.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free