getRemainingWorkInPrimaryTree() — react Function Reference
Architecture documentation for the getRemainingWorkInPrimaryTree() function in ReactFiberBeginWork.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD a9bd5488_92fb_77d0_d235_59865a308ccf["getRemainingWorkInPrimaryTree()"] 0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"] a9bd5488_92fb_77d0_d235_59865a308ccf -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c f4acdab6_f680_af63_8940_0259a68c2f48["updateSuspenseComponent()"] f4acdab6_f680_af63_8940_0259a68c2f48 -->|calls| a9bd5488_92fb_77d0_d235_59865a308ccf a8a1881a_9da1_7942_71cd_b9ab16efd50c["updateDehydratedSuspenseComponent()"] a8a1881a_9da1_7942_71cd_b9ab16efd50c -->|calls| a9bd5488_92fb_77d0_d235_59865a308ccf style a9bd5488_92fb_77d0_d235_59865a308ccf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-reconciler/src/ReactFiberBeginWork.js lines 2327–2343
function getRemainingWorkInPrimaryTree(
current: Fiber | null,
primaryTreeDidDefer: boolean,
renderLanes: Lanes,
) {
let remainingLanes =
current !== null ? removeLanes(current.childLanes, renderLanes) : NoLanes;
if (primaryTreeDidDefer) {
// A useDeferredValue hook spawned a deferred task inside the primary tree.
// Ensure that we retry this component at the deferred priority.
// TODO: We could make this a per-subtree value instead of a global one.
// Would need to track it on the context stack somehow, similar to what
// we'd have to do for resumable contexts.
remainingLanes = mergeLanes(remainingLanes, peekDeferredLane());
}
return remainingLanes;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does getRemainingWorkInPrimaryTree() do?
getRemainingWorkInPrimaryTree() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is getRemainingWorkInPrimaryTree() defined?
getRemainingWorkInPrimaryTree() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 2327.
What calls getRemainingWorkInPrimaryTree()?
getRemainingWorkInPrimaryTree() is called by 2 function(s): updateDehydratedSuspenseComponent, updateSuspenseComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free