ReactFiberGestureScheduler.js — react Source File
Architecture documentation for ReactFiberGestureScheduler.js, a javascript file in the react codebase. 9 imports, 4 dependents.
Entity Profile
Dependency Diagram
graph LR 8193bb5a_9f72_452e_5391_5f40038fa638["ReactFiberGestureScheduler.js"] 6b9f5caa_fb13_3d3c_2f60_ad3c4f58371f["ReactInternalTypes.js"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> 6b9f5caa_fb13_3d3c_2f60_ad3c4f58371f a6668d1d_397d_7807_719d_fdecf552fa4a["ReactFiberConfig.js"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> a6668d1d_397d_7807_719d_fdecf552fa4a 768f6d67_77c1_be19_5596_a943eab59e05["ReactFiberLane.js"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> 768f6d67_77c1_be19_5596_a943eab59e05 a22f22c8_f97a_86c8_be5a_4b91a6a21eab["ReactFiberRootScheduler.js"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> a22f22c8_f97a_86c8_be5a_4b91a6a21eab 3aa9c8cd_1d3e_a63b_dc04_9103ee37fc22["ensureRootIsScheduled"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> 3aa9c8cd_1d3e_a63b_dc04_9103ee37fc22 1b2584b3_97ce_42e6_080f_e2dfd9f999a6["requestTransitionLane"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> 1b2584b3_97ce_42e6_080f_e2dfd9f999a6 d73e9290_2d2e_5d3f_97dd_84929f205c77["ReactFiberWorkLoop.js"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> d73e9290_2d2e_5d3f_97dd_84929f205c77 d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07 76faa448_9fd8_5bef_16ff_7129054308ac["ReactTransitionType"] 8193bb5a_9f72_452e_5391_5f40038fa638 --> 76faa448_9fd8_5bef_16ff_7129054308ac 85d2c68c_7609_2c66_22fb_5f02e8a2e8fe["ReactFiberHooks.js"] 85d2c68c_7609_2c66_22fb_5f02e8a2e8fe --> 8193bb5a_9f72_452e_5391_5f40038fa638 7b9cb3e8_e71c_27b2_61e8_fe54f0f80f0b["ReactFiberTransition.js"] 7b9cb3e8_e71c_27b2_61e8_fe54f0f80f0b --> 8193bb5a_9f72_452e_5391_5f40038fa638 d73e9290_2d2e_5d3f_97dd_84929f205c77["ReactFiberWorkLoop.js"] d73e9290_2d2e_5d3f_97dd_84929f205c77 --> 8193bb5a_9f72_452e_5391_5f40038fa638 6b9f5caa_fb13_3d3c_2f60_ad3c4f58371f["ReactInternalTypes.js"] 6b9f5caa_fb13_3d3c_2f60_ad3c4f58371f --> 8193bb5a_9f72_452e_5391_5f40038fa638 style 8193bb5a_9f72_452e_5391_5f40038fa638 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 {FiberRoot} from './ReactInternalTypes';
import type {GestureOptions} from 'shared/ReactTypes';
import type {GestureTimeline, RunningViewTransition} from './ReactFiberConfig';
import type {TransitionTypes} from 'react/src/ReactTransitionType';
import type {Lane} from './ReactFiberLane';
import {
GestureLane,
markRootEntangled,
markRootFinished,
NoLane,
NoLanes,
} from './ReactFiberLane';
import {
ensureRootIsScheduled,
requestTransitionLane,
} from './ReactFiberRootScheduler';
import {getCurrentGestureOffset, stopViewTransition} from './ReactFiberConfig';
import {pingGestureRoot, restartGestureRoot} from './ReactFiberWorkLoop';
// This type keeps track of any scheduled or active gestures.
export type ScheduledGesture = {
provider: GestureTimeline,
count: number, // The number of times this same provider has been started.
rangeStart: number, // The percentage along the timeline where the "current" state starts.
rangeEnd: number, // The percentage along the timeline where the "destination" state is reached.
types: null | TransitionTypes, // Any addTransitionType call made during startGestureTransition.
running: null | RunningViewTransition, // Used to cancel the running transition after we're done.
commit: null | (() => void), // Callback to run to commit if there's a pending commit.
committing: boolean, // If the gesture was released in a committed state and should actually commit.
revertLane: Lane, // The Lane that we'll use to schedule the revert.
prev: null | ScheduledGesture, // The previous scheduled gesture in the queue for this root.
next: null | ScheduledGesture, // The next scheduled gesture in the queue for this root.
};
export function scheduleGesture(
root: FiberRoot,
provider: GestureTimeline,
): ScheduledGesture {
let prev = root.pendingGestures;
while (prev !== null) {
if (prev.provider === provider) {
// Existing instance found.
return prev;
}
const next = prev.next;
if (next === null) {
break;
}
prev = next;
}
// ... (198 more lines)
Domain
Subdomains
Dependencies
Imported By
Source
Frequently Asked Questions
What does ReactFiberGestureScheduler.js do?
ReactFiberGestureScheduler.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 ReactFiberGestureScheduler.js?
ReactFiberGestureScheduler.js defines 4 function(s): cancelScheduledGesture, scheduleGesture, startScheduledGesture, stopCommittedGesture.
What does ReactFiberGestureScheduler.js depend on?
ReactFiberGestureScheduler.js imports 9 module(s): ReactFiberConfig.js, ReactFiberLane.js, ReactFiberRootScheduler.js, ReactFiberWorkLoop.js, ReactInternalTypes.js, ReactTransitionType, ReactTypes, ensureRootIsScheduled, and 1 more.
What files import ReactFiberGestureScheduler.js?
ReactFiberGestureScheduler.js is imported by 4 file(s): ReactFiberHooks.js, ReactFiberTransition.js, ReactFiberWorkLoop.js, ReactInternalTypes.js.
Where is ReactFiberGestureScheduler.js in the architecture?
ReactFiberGestureScheduler.js is located at packages/react-reconciler/src/ReactFiberGestureScheduler.js (domain: BabelCompiler, subdomain: Validation, 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