updateValueIfChanged() — react Function Reference
Architecture documentation for the updateValueIfChanged() function in inputValueTracking.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD c66d3317_2d86_a8d4_7629_44de9f6a564d["updateValueIfChanged()"] 87cb1bb7_ad8f_2954_9806_14348a9bbec3["inputValueTracking.js"] c66d3317_2d86_a8d4_7629_44de9f6a564d -->|defined in| 87cb1bb7_ad8f_2954_9806_14348a9bbec3 eb91f874_8ee4_2703_d333_d67f28ac1a0b["restoreControlledInputState()"] eb91f874_8ee4_2703_d333_d67f28ac1a0b -->|calls| c66d3317_2d86_a8d4_7629_44de9f6a564d 01a8dfab_7064_d128_d114_f628d32337b1["getInstIfValueChanged()"] 01a8dfab_7064_d128_d114_f628d32337b1 -->|calls| c66d3317_2d86_a8d4_7629_44de9f6a564d style c66d3317_2d86_a8d4_7629_44de9f6a564d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-dom-bindings/src/client/inputValueTracking.js lines 162–181
export function updateValueIfChanged(node: ElementWithValueTracker): boolean {
if (!node) {
return false;
}
const tracker = getTracker(node);
// if there is no tracker at this point it's unlikely
// that trying again will succeed
if (!tracker) {
return true;
}
const lastValue = tracker.getValue();
const nextValue = getValueFromNode(node);
if (nextValue !== lastValue) {
tracker.setValue(nextValue);
return true;
}
return false;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does updateValueIfChanged() do?
updateValueIfChanged() is a function in the react codebase, defined in packages/react-dom-bindings/src/client/inputValueTracking.js.
Where is updateValueIfChanged() defined?
updateValueIfChanged() is defined in packages/react-dom-bindings/src/client/inputValueTracking.js at line 162.
What calls updateValueIfChanged()?
updateValueIfChanged() is called by 2 function(s): getInstIfValueChanged, restoreControlledInputState.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free