processUpdateQueue() — react Function Reference
Architecture documentation for the processUpdateQueue() function in ReactFizzClassComponent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD bd96449d_3822_0ea5_878f_70fab765cc32["processUpdateQueue()"] 8f850c79_0562_f37f_80ff_563c50cd0996["ReactFizzClassComponent.js"] bd96449d_3822_0ea5_878f_70fab765cc32 -->|defined in| 8f850c79_0562_f37f_80ff_563c50cd0996 214e29b1_8411_c0df_65fc_dabe157ff86e["mountClassInstance()"] 214e29b1_8411_c0df_65fc_dabe157ff86e -->|calls| bd96449d_3822_0ea5_878f_70fab765cc32 style bd96449d_3822_0ea5_878f_70fab765cc32 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-server/src/ReactFizzClassComponent.js lines 586–623
function processUpdateQueue(
internalInstance: InternalInstance,
inst: any,
props: any,
maskedLegacyContext: any,
): void {
if (internalInstance.queue !== null && internalInstance.queue.length > 0) {
const oldQueue = internalInstance.queue;
const oldReplace = internalInstance.replace;
internalInstance.queue = null;
internalInstance.replace = false;
if (oldReplace && oldQueue.length === 1) {
inst.state = oldQueue[0];
} else {
let nextState = oldReplace ? oldQueue[0] : inst.state;
let dontMutate = true;
for (let i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
const partial = oldQueue[i];
const partialState =
typeof partial === 'function'
? partial.call(inst, nextState, props, maskedLegacyContext)
: partial;
if (partialState != null) {
if (dontMutate) {
dontMutate = false;
nextState = assign({}, nextState, partialState);
} else {
assign(nextState, partialState);
}
}
}
inst.state = nextState;
}
} else {
internalInstance.queue = null;
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does processUpdateQueue() do?
processUpdateQueue() is a function in the react codebase, defined in packages/react-server/src/ReactFizzClassComponent.js.
Where is processUpdateQueue() defined?
processUpdateQueue() is defined in packages/react-server/src/ReactFizzClassComponent.js at line 586.
What calls processUpdateQueue()?
processUpdateQueue() is called by 1 function(s): mountClassInstance.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free