Home / Function/ commitBeforeMutationEffects() — react Function Reference

commitBeforeMutationEffects() — react Function Reference

Architecture documentation for the commitBeforeMutationEffects() function in ReactFiberCommitWork.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  4b8572b4_38ff_201d_107a_4c712ded191e["commitBeforeMutationEffects()"]
  e0fbfbd5_47b0_a489_0b36_bbfad9245544["ReactFiberCommitWork.js"]
  4b8572b4_38ff_201d_107a_4c712ded191e -->|defined in| e0fbfbd5_47b0_a489_0b36_bbfad9245544
  512307b3_e8b2_3a7d_0d24_ed564120f990["commitBeforeMutationEffects_begin()"]
  4b8572b4_38ff_201d_107a_4c712ded191e -->|calls| 512307b3_e8b2_3a7d_0d24_ed564120f990
  54570ce9_335d_c5f7_ba30_9badaf34a0ec["resetAppearingViewTransitions()"]
  4b8572b4_38ff_201d_107a_4c712ded191e -->|calls| 54570ce9_335d_c5f7_ba30_9badaf34a0ec
  style 4b8572b4_38ff_201d_107a_4c712ded191e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-reconciler/src/ReactFiberCommitWork.js lines 344–363

export function commitBeforeMutationEffects(
  root: FiberRoot,
  firstChild: Fiber,
  committedLanes: Lanes,
): void {
  focusedInstanceHandle = prepareForCommit(root.containerInfo);
  shouldFireAfterActiveInstanceBlur = false;

  const isViewTransitionEligible =
    enableViewTransition &&
    includesOnlyViewTransitionEligibleLanes(committedLanes);

  nextEffect = firstChild;
  commitBeforeMutationEffects_begin(isViewTransitionEligible);

  // We no longer need to track the active instance fiber
  focusedInstanceHandle = null;
  // We've found any matched pairs and can now reset.
  resetAppearingViewTransitions();
}

Domain

Subdomains

Frequently Asked Questions

What does commitBeforeMutationEffects() do?
commitBeforeMutationEffects() is a function in the react codebase, defined in packages/react-reconciler/src/ReactFiberCommitWork.js.
Where is commitBeforeMutationEffects() defined?
commitBeforeMutationEffects() is defined in packages/react-reconciler/src/ReactFiberCommitWork.js at line 344.
What does commitBeforeMutationEffects() call?
commitBeforeMutationEffects() calls 2 function(s): commitBeforeMutationEffects_begin, resetAppearingViewTransitions.

Analyze Your Own Codebase

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

Try Supermodel Free