ReactFlightParcelReferences.js — react Source File
Architecture documentation for ReactFlightParcelReferences.js, a javascript file in the react codebase. 1 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR b3add538_0528_e63e_5e16_76a2f1c91d8f["ReactFlightParcelReferences.js"] 0cf33a2a_6fe6_7412_bf8d_09664538a80f["ReactFlightServer"] b3add538_0528_e63e_5e16_76a2f1c91d8f --> 0cf33a2a_6fe6_7412_bf8d_09664538a80f 519cbd03_7568_21cc_974b_ab7e2ca59f15["ReactFlightServerConfigParcelBundler.js"] 519cbd03_7568_21cc_974b_ab7e2ca59f15 --> b3add538_0528_e63e_5e16_76a2f1c91d8f style b3add538_0528_e63e_5e16_76a2f1c91d8f 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 {ReactClientValue} from 'react-server/src/ReactFlightServer';
export type ServerReference<T: Function> = T & {
$$typeof: symbol,
$$id: string,
$$bound: null | Array<ReactClientValue>,
$$location?: Error,
};
// eslint-disable-next-line no-unused-vars
export type ClientReference<T> = {
$$typeof: symbol,
$$id: string,
$$name: string,
$$bundles: Array<string>,
$$importMap?: ?{[string]: string},
};
const CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference');
const SERVER_REFERENCE_TAG = Symbol.for('react.server.reference');
export function isClientReference(reference: Object): boolean {
return reference.$$typeof === CLIENT_REFERENCE_TAG;
}
export function isServerReference(reference: Object): boolean {
return reference.$$typeof === SERVER_REFERENCE_TAG;
}
export function createClientReference<T>(
id: string,
exportName: string,
bundles: Array<string>,
importMap?: ?{[string]: string},
): ClientReference<T> {
return {
$$typeof: CLIENT_REFERENCE_TAG,
$$id: id,
$$name: exportName,
$$bundles: bundles,
$$importMap: importMap,
};
}
// $FlowFixMe[method-unbinding]
const FunctionBind = Function.prototype.bind;
// $FlowFixMe[method-unbinding]
const ArraySlice = Array.prototype.slice;
function bind(this: ServerReference<any>): any {
// $FlowFixMe[incompatible-call]
const newFn = FunctionBind.apply(this, arguments);
// ... (78 more lines)
Domain
Subdomains
Functions
Dependencies
- ReactFlightServer
Source
Frequently Asked Questions
What does ReactFlightParcelReferences.js do?
ReactFlightParcelReferences.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 ReactFlightParcelReferences.js?
ReactFlightParcelReferences.js defines 2 function(s): isClientReference, isServerReference.
What does ReactFlightParcelReferences.js depend on?
ReactFlightParcelReferences.js imports 1 module(s): ReactFlightServer.
What files import ReactFlightParcelReferences.js?
ReactFlightParcelReferences.js is imported by 1 file(s): ReactFlightServerConfigParcelBundler.js.
Where is ReactFlightParcelReferences.js in the architecture?
ReactFlightParcelReferences.js is located at packages/react-server-dom-parcel/src/ReactFlightParcelReferences.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server-dom-parcel/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free