ReactStartTransition.js — react Source File
Architecture documentation for ReactStartTransition.js, a javascript file in the react codebase. 7 imports, 5 dependents.
Entity Profile
Dependency Diagram
graph LR 6c1a4807_17b9_f103_ac9c_f90f16c710be["ReactStartTransition.js"] a822dcfc_4b5e_c5ea_05e7_3eae6016c82b["ReactTransitionType.js"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> a822dcfc_4b5e_c5ea_05e7_3eae6016c82b 42892443_e223_3da0_aeb9_e1b32a408fb0["ReactInternalTypes"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> 42892443_e223_3da0_aeb9_e1b32a408fb0 d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07 1c5695a6_6806_ba54_2074_efc779e66da4["ReactSharedInternals"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> 1c5695a6_6806_ba54_2074_efc779e66da4 8344de1b_978c_be0f_eebd_38ccc4962a93["ReactFeatureFlags"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> 8344de1b_978c_be0f_eebd_38ccc4962a93 20cbf540_4aea_6101_42b9_66d4c75ec091["reportGlobalError"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> 20cbf540_4aea_6101_42b9_66d4c75ec091 4321c04c_6e7b_409b_4c59_c09fbf7074a8["noop"] 6c1a4807_17b9_f103_ac9c_f90f16c710be --> 4321c04c_6e7b_409b_4c59_c09fbf7074a8 ffdf54f0_7e34_f1e9_1504_9dbadb0fbac5["ReactClient.js"] ffdf54f0_7e34_f1e9_1504_9dbadb0fbac5 --> 6c1a4807_17b9_f103_ac9c_f90f16c710be a893f937_cfbc_33f8_94ec_23cb5000691e["ReactServer.experimental.development.js"] a893f937_cfbc_33f8_94ec_23cb5000691e --> 6c1a4807_17b9_f103_ac9c_f90f16c710be 8510e4c8_924c_b1b8_d0a0_11cb99b570c0["ReactServer.experimental.js"] 8510e4c8_924c_b1b8_d0a0_11cb99b570c0 --> 6c1a4807_17b9_f103_ac9c_f90f16c710be d73e8952_8d9a_9536_f6d1_89e62a9194a3["ReactSharedInternalsClient.js"] d73e8952_8d9a_9536_f6d1_89e62a9194a3 --> 6c1a4807_17b9_f103_ac9c_f90f16c710be a822dcfc_4b5e_c5ea_05e7_3eae6016c82b["ReactTransitionType.js"] a822dcfc_4b5e_c5ea_05e7_3eae6016c82b --> 6c1a4807_17b9_f103_ac9c_f90f16c710be style 6c1a4807_17b9_f103_ac9c_f90f16c710be 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 {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {
StartTransitionOptions,
GestureProvider,
GestureOptions,
} from 'shared/ReactTypes';
import type {TransitionTypes} from './ReactTransitionType';
import ReactSharedInternals from 'shared/ReactSharedInternals';
import {
enableTransitionTracing,
enableViewTransition,
enableGestureTransition,
} from 'shared/ReactFeatureFlags';
import reportGlobalError from 'shared/reportGlobalError';
import noop from 'shared/noop';
export type Transition = {
types: null | TransitionTypes, // enableViewTransition
gesture: null | GestureProvider, // enableGestureTransition
name: null | string, // enableTransitionTracing only
startTime: number, // enableTransitionTracing only
_updatedFibers: Set<Fiber>, // DEV-only
...
};
function releaseAsyncTransition() {
if (__DEV__) {
ReactSharedInternals.asyncTransitions--;
}
}
export function startTransition(
scope: () => void,
options?: StartTransitionOptions,
): void {
const prevTransition = ReactSharedInternals.T;
const currentTransition: Transition = ({}: any);
if (enableViewTransition) {
currentTransition.types =
prevTransition !== null
? // If we're a nested transition, we should use the same set as the parent
// since we're conceptually always joined into the same entangled transition.
// In practice, this only matters if we add transition types in the inner
// without setting state. In that case, the inner transition can finish
// without waiting for the outer.
prevTransition.types
: null;
// ... (143 more lines)
Domain
Subdomains
Functions
Dependencies
- ReactFeatureFlags
- ReactInternalTypes
- ReactSharedInternals
- ReactTransitionType.js
- ReactTypes
- noop
- reportGlobalError
Imported By
Source
Frequently Asked Questions
What does ReactStartTransition.js do?
ReactStartTransition.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactStartTransition.js?
ReactStartTransition.js defines 3 function(s): T, releaseAsyncTransition, types.
What does ReactStartTransition.js depend on?
ReactStartTransition.js imports 7 module(s): ReactFeatureFlags, ReactInternalTypes, ReactSharedInternals, ReactTransitionType.js, ReactTypes, noop, reportGlobalError.
What files import ReactStartTransition.js?
ReactStartTransition.js is imported by 5 file(s): ReactClient.js, ReactServer.experimental.development.js, ReactServer.experimental.js, ReactSharedInternalsClient.js, ReactTransitionType.js.
Where is ReactStartTransition.js in the architecture?
ReactStartTransition.js is located at packages/react/src/ReactStartTransition.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free