Home / Function/ pushHostRootContext() — react Function Reference

pushHostRootContext() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  709caba0_6dab_3197_d227_28b3fa3a6dc4["pushHostRootContext()"]
  0be70812_cc0c_b210_f84f_8e61dd5f831c["ReactFiberBeginWork.js"]
  709caba0_6dab_3197_d227_28b3fa3a6dc4 -->|defined in| 0be70812_cc0c_b210_f84f_8e61dd5f831c
  53f55fda_e2b6_2801_4fbc_525f8828d23d["updateHostRoot()"]
  53f55fda_e2b6_2801_4fbc_525f8828d23d -->|calls| 709caba0_6dab_3197_d227_28b3fa3a6dc4
  df2c7818_4611_b8d2_dfe8_a79e5972020c["attemptEarlyBailoutIfNoScheduledUpdate()"]
  df2c7818_4611_b8d2_dfe8_a79e5972020c -->|calls| 709caba0_6dab_3197_d227_28b3fa3a6dc4
  e104a7c6_8b49_d343_834d_bfd8cdc38b6d["pushHostContainer()"]
  709caba0_6dab_3197_d227_28b3fa3a6dc4 -->|calls| e104a7c6_8b49_d343_834d_bfd8cdc38b6d
  style 709caba0_6dab_3197_d227_28b3fa3a6dc4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberBeginWork.js lines 1782–1795

function pushHostRootContext(workInProgress: Fiber) {
  const root = (workInProgress.stateNode: FiberRoot);
  if (root.pendingContext) {
    pushTopLevelContextObject(
      workInProgress,
      root.pendingContext,
      root.pendingContext !== root.context,
    );
  } else if (root.context) {
    // Should always be set
    pushTopLevelContextObject(workInProgress, root.context, false);
  }
  pushHostContainer(workInProgress, root.containerInfo);
}

Domain

Subdomains

Frequently Asked Questions

What does pushHostRootContext() do?
pushHostRootContext() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberBeginWork.js.
Where is pushHostRootContext() defined?
pushHostRootContext() is defined in packages/react-reconciler/src/ReactFiberBeginWork.js at line 1782.
What does pushHostRootContext() call?
pushHostRootContext() calls 1 function(s): pushHostContainer.
What calls pushHostRootContext()?
pushHostRootContext() is called by 2 function(s): attemptEarlyBailoutIfNoScheduledUpdate, updateHostRoot.

Analyze Your Own Codebase

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

Try Supermodel Free