Home / File/ ReactFiberAsyncAction.js — react Source File

ReactFiberAsyncAction.js — react Source File

Architecture documentation for ReactFiberAsyncAction.js, a javascript file in the react codebase. 14 imports, 5 dependents.

File javascript BabelCompiler 14 imports 5 dependents

Entity Profile

Dependency Diagram

graph LR
  6332839f_b3f6_a025_4ca8_e9753718df71["ReactFiberAsyncAction.js"]
  768f6d67_77c1_be19_5596_a943eab59e05["ReactFiberLane.js"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 768f6d67_77c1_be19_5596_a943eab59e05
  a22f22c8_f97a_86c8_be5a_4b91a6a21eab["ReactFiberRootScheduler.js"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> a22f22c8_f97a_86c8_be5a_4b91a6a21eab
  1b2584b3_97ce_42e6_080f_e2dfd9f999a6["requestTransitionLane"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 1b2584b3_97ce_42e6_080f_e2dfd9f999a6
  95634e0b_1432_3e7f_4dd5_05b73a79c629["ensureScheduleIsScheduled"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 95634e0b_1432_3e7f_4dd5_05b73a79c629
  e054b9c7_41f1_c7f7_97bb_98b6a445e94b["ReactProfilerTimer.js"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> e054b9c7_41f1_c7f7_97bb_98b6a445e94b
  44183b1e_82f6_2170_eb41_bda2ba55df17["hasScheduledTransitionWork"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 44183b1e_82f6_2170_eb41_bda2ba55df17
  354ebf6c_e48e_2c41_d6da_a42738f4f767["clearAsyncTransitionTimer"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 354ebf6c_e48e_2c41_d6da_a42738f4f767
  1e43c23f_3064_3cbe_7b30_bc1d04cb479f["ReactFiberTransitionTypes.js"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 1e43c23f_3064_3cbe_7b30_bc1d04cb479f
  0870fe7e_2905_3d1b_3cd7_4e137c927703["clearEntangledAsyncTransitionTypes"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 0870fe7e_2905_3d1b_3cd7_4e137c927703
  d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07
  3ff6a79c_0a0b_9ae4_6826_41e836ae2a7c["ReactStartTransition"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 3ff6a79c_0a0b_9ae4_6826_41e836ae2a7c
  8344de1b_978c_be0f_eebd_38ccc4962a93["ReactFeatureFlags"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 8344de1b_978c_be0f_eebd_38ccc4962a93
  4321c04c_6e7b_409b_4c59_c09fbf7074a8["noop"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 4321c04c_6e7b_409b_4c59_c09fbf7074a8
  20cbf540_4aea_6101_42b9_66d4c75ec091["reportGlobalError"]
  6332839f_b3f6_a025_4ca8_e9753718df71 --> 20cbf540_4aea_6101_42b9_66d4c75ec091
  style 6332839f_b3f6_a025_4ca8_e9753718df71 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import type {
  Thenable,
  FulfilledThenable,
  RejectedThenable,
} from 'shared/ReactTypes';
import type {Lane} from './ReactFiberLane';
import type {Transition} from 'react/src/ReactStartTransition';

import {
  requestTransitionLane,
  ensureScheduleIsScheduled,
} from './ReactFiberRootScheduler';
import {NoLane} from './ReactFiberLane';
import {
  hasScheduledTransitionWork,
  clearAsyncTransitionTimer,
} from './ReactProfilerTimer';
import {
  enableComponentPerformanceTrack,
  enableProfilerTimer,
  enableDefaultTransitionIndicator,
} from 'shared/ReactFeatureFlags';
import {clearEntangledAsyncTransitionTypes} from './ReactFiberTransitionTypes';

import noop from 'shared/noop';
import reportGlobalError from 'shared/reportGlobalError';

// If there are multiple, concurrent async actions, they are entangled. All
// transition updates that occur while the async action is still in progress
// are treated as part of the action.
//
// The ideal behavior would be to treat each async function as an independent
// action. However, without a mechanism like AsyncContext, we can't tell which
// action an update corresponds to. So instead, we entangle them all into one.

// The listeners to notify once the entangled scope completes.
let currentEntangledListeners: Array<() => mixed> | null = null;
// The number of pending async actions in the entangled scope.
let currentEntangledPendingCount: number = 0;
// The transition lane shared by all updates in the entangled scope.
let currentEntangledLane: Lane = NoLane;
// A thenable that resolves when the entangled scope completes. It does not
// resolve to a particular value because it's only used for suspending the UI
// until the async action scope has completed.
let currentEntangledActionThenable: Thenable<void> | null = null;

// Track the default indicator for every root. undefined means we haven't
// had any roots registered yet. null means there's more than one callback.
// If there's more than one callback we bailout to not supporting isomorphic
// default indicators.
let isomorphicDefaultTransitionIndicator:
// ... (204 more lines)

Domain

Frequently Asked Questions

What does ReactFiberAsyncAction.js do?
ReactFiberAsyncAction.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does ReactFiberAsyncAction.js depend on?
ReactFiberAsyncAction.js imports 14 module(s): ReactFeatureFlags, ReactFiberLane.js, ReactFiberRootScheduler.js, ReactFiberTransitionTypes.js, ReactProfilerTimer.js, ReactStartTransition, ReactTypes, clearAsyncTransitionTimer, and 6 more.
What files import ReactFiberAsyncAction.js?
ReactFiberAsyncAction.js is imported by 5 file(s): ReactFiberClassUpdateQueue.js, ReactFiberHooks.js, ReactFiberReconciler.js, ReactFiberRootScheduler.js, ReactFiberTransition.js.
Where is ReactFiberAsyncAction.js in the architecture?
ReactFiberAsyncAction.js is located at packages/react-reconciler/src/ReactFiberAsyncAction.js (domain: BabelCompiler, directory: packages/react-reconciler/src).

Analyze Your Own Codebase

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

Try Supermodel Free