Home / Function/ performSyncWorkOnRoot() — react Function Reference

performSyncWorkOnRoot() — react Function Reference

Architecture documentation for the performSyncWorkOnRoot() function in ReactFiberRootScheduler.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9070656a_aeba_28ff_4921_4bcb0225f5c1["performSyncWorkOnRoot()"]
  a22f22c8_f97a_86c8_be5a_4b91a6a21eab["ReactFiberRootScheduler.js"]
  9070656a_aeba_28ff_4921_4bcb0225f5c1 -->|defined in| a22f22c8_f97a_86c8_be5a_4b91a6a21eab
  b696b90a_5e97_f015_c2fa_f3bf0b69c0d2["flushSyncWorkAcrossRoots_impl()"]
  b696b90a_5e97_f015_c2fa_f3bf0b69c0d2 -->|calls| 9070656a_aeba_28ff_4921_4bcb0225f5c1
  style 9070656a_aeba_28ff_4921_4bcb0225f5c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberRootScheduler.js lines 608–622

function performSyncWorkOnRoot(root: FiberRoot, lanes: Lanes) {
  // This is the entry point for synchronous tasks that don't go
  // through Scheduler.
  const didFlushPassiveEffects = flushPendingEffects();
  if (didFlushPassiveEffects) {
    // If passive effects were flushed, exit to the outer work loop in the root
    // scheduler, so we can recompute the priority.
    return null;
  }
  if (enableProfilerTimer && enableProfilerNestedUpdatePhase) {
    syncNestedUpdateFlag();
  }
  const forceSync = true;
  performWorkOnRoot(root, lanes, forceSync);
}

Domain

Subdomains

Frequently Asked Questions

What does performSyncWorkOnRoot() do?
performSyncWorkOnRoot() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberRootScheduler.js.
Where is performSyncWorkOnRoot() defined?
performSyncWorkOnRoot() is defined in packages/react-reconciler/src/ReactFiberRootScheduler.js at line 608.
What calls performSyncWorkOnRoot()?
performSyncWorkOnRoot() is called by 1 function(s): flushSyncWorkAcrossRoots_impl.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free