Home / Function/ checkScheduledUpdateOrContext() — react Function Reference

checkScheduledUpdateOrContext() — react Function Reference

Architecture documentation for the checkScheduledUpdateOrContext() function in ReactFiberBeginWork.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  ec058345_39f3_16c0_234d_553132510c15["checkScheduledUpdateOrContext()"]
  0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"]
  ec058345_39f3_16c0_234d_553132510c15 -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c
  a032b50f_d1ac_c367_9f15_394d8f0023c1["updateMemoComponent()"]
  a032b50f_d1ac_c367_9f15_394d8f0023c1 -->|calls| ec058345_39f3_16c0_234d_553132510c15
  d5867db8_c86c_35f1_776d_f9f063826e18["updateSimpleMemoComponent()"]
  d5867db8_c86c_35f1_776d_f9f063826e18 -->|calls| ec058345_39f3_16c0_234d_553132510c15
  235e1db1_02a4_912f_7d82_ea6636c850c0["beginWork()"]
  235e1db1_02a4_912f_7d82_ea6636c850c0 -->|calls| ec058345_39f3_16c0_234d_553132510c15
  style ec058345_39f3_16c0_234d_553132510c15 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberBeginWork.js lines 3874–3891

function checkScheduledUpdateOrContext(
  current: Fiber,
  renderLanes: Lanes,
): boolean {
  // Before performing an early bailout, we must check if there are pending
  // updates or context.
  const updateLanes = current.lanes;
  if (includesSomeLane(updateLanes, renderLanes)) {
    return true;
  }
  // No pending update, but because context is propagated lazily, we need
  // to check for a context change before we bail out.
  const dependencies = current.dependencies;
  if (dependencies !== null && checkIfContextChanged(dependencies)) {
    return true;
  }
  return false;
}

Domain

Subdomains

Frequently Asked Questions

What does checkScheduledUpdateOrContext() do?
checkScheduledUpdateOrContext() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is checkScheduledUpdateOrContext() defined?
checkScheduledUpdateOrContext() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 3874.
What calls checkScheduledUpdateOrContext()?
checkScheduledUpdateOrContext() is called by 3 function(s): beginWork, updateMemoComponent, updateSimpleMemoComponent.

Analyze Your Own Codebase

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

Try Supermodel Free