ReactFiberAsyncDispatcher.js — react Source File
Architecture documentation for ReactFiberAsyncDispatcher.js, a javascript file in the react codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR d204555d_8af7_71f6_c18b_ea6503e178bf["ReactFiberAsyncDispatcher.js"] 6b9f5caa_fb13_3d3c_2f60_ad3c4f58371f["ReactInternalTypes.js"] d204555d_8af7_71f6_c18b_ea6503e178bf --> 6b9f5caa_fb13_3d3c_2f60_ad3c4f58371f 8d310484_4245_75c0_c183_7a31fce6815e["ReactFiberCacheComponent.js"] d204555d_8af7_71f6_c18b_ea6503e178bf --> 8d310484_4245_75c0_c183_7a31fce6815e 278c890a_abdf_e007_0c26_ae3bc8eda908["ReactFiberNewContext.js"] d204555d_8af7_71f6_c18b_ea6503e178bf --> 278c890a_abdf_e007_0c26_ae3bc8eda908 c115f947_44f7_8d77_0323_1e260644c151["ReactCurrentFiber.js"] d204555d_8af7_71f6_c18b_ea6503e178bf --> c115f947_44f7_8d77_0323_1e260644c151 d73e9290_2d2e_5d3f_97dd_84929f205c77["ReactFiberWorkLoop.js"] d73e9290_2d2e_5d3f_97dd_84929f205c77 --> d204555d_8af7_71f6_c18b_ea6503e178bf style d204555d_8af7_71f6_c18b_ea6503e178bf 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 {AsyncDispatcher, Fiber} from './ReactInternalTypes';
import type {Cache} from './ReactFiberCacheComponent';
import {readContext} from './ReactFiberNewContext';
import {CacheContext} from './ReactFiberCacheComponent';
import {current as currentOwner} from './ReactCurrentFiber';
function getCacheForType<T>(resourceType: () => T): T {
const cache: Cache = readContext(CacheContext);
let cacheForType: T | void = (cache.data.get(resourceType): any);
if (cacheForType === undefined) {
cacheForType = resourceType();
cache.data.set(resourceType, cacheForType);
}
return cacheForType;
}
function cacheSignal(): null | AbortSignal {
const cache: Cache = readContext(CacheContext);
return cache.controller.signal;
}
export const DefaultAsyncDispatcher: AsyncDispatcher = ({
getCacheForType,
cacheSignal,
}: any);
if (__DEV__) {
DefaultAsyncDispatcher.getOwner = (): null | Fiber => {
return currentOwner;
};
}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does ReactFiberAsyncDispatcher.js do?
ReactFiberAsyncDispatcher.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 ReactFiberAsyncDispatcher.js?
ReactFiberAsyncDispatcher.js defines 1 function(s): DefaultAsyncDispatcher.
What does ReactFiberAsyncDispatcher.js depend on?
ReactFiberAsyncDispatcher.js imports 4 module(s): ReactCurrentFiber.js, ReactFiberCacheComponent.js, ReactFiberNewContext.js, ReactInternalTypes.js.
What files import ReactFiberAsyncDispatcher.js?
ReactFiberAsyncDispatcher.js is imported by 1 file(s): ReactFiberWorkLoop.js.
Where is ReactFiberAsyncDispatcher.js in the architecture?
ReactFiberAsyncDispatcher.js is located at packages/react-reconciler/src/ReactFiberAsyncDispatcher.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