ReactFizzCallUserSpace.js — react Source File
Architecture documentation for ReactFizzCallUserSpace.js, a javascript file in the react codebase. 1 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 4dc199f3_25b6_1aee_9cfe_6b1620dc599a["ReactFizzCallUserSpace.js"] ebbd7451_c238_0c5d_d01e_21d7c2d60653["ReactLazy"] 4dc199f3_25b6_1aee_9cfe_6b1620dc599a --> ebbd7451_c238_0c5d_d01e_21d7c2d60653 1b694821_5816_1762_7c98_f0727a09e732["ReactFizzServer.js"] 1b694821_5816_1762_7c98_f0727a09e732 --> 4dc199f3_25b6_1aee_9cfe_6b1620dc599a style 4dc199f3_25b6_1aee_9cfe_6b1620dc599a 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 {LazyComponent} from 'react/src/ReactLazy';
// These indirections exists so we can exclude its stack frame in DEV (and anything below it).
// TODO: Consider marking the whole bundle instead of these boundaries.
const callComponent = {
react_stack_bottom_frame: function <Props, Arg, R>(
Component: (p: Props, arg: Arg) => R,
props: Props,
secondArg: Arg,
): R {
return Component(props, secondArg);
},
};
export const callComponentInDEV: <Props, Arg, R>(
Component: (p: Props, arg: Arg) => R,
props: Props,
secondArg: Arg,
) => R = __DEV__
? // We use this technique to trick minifiers to preserve the function name.
(callComponent.react_stack_bottom_frame.bind(callComponent): any)
: (null: any);
interface ClassInstance<R> {
render(): R;
}
const callRender = {
react_stack_bottom_frame: function <R>(instance: ClassInstance<R>): R {
return instance.render();
},
};
export const callRenderInDEV: <R>(instance: ClassInstance<R>) => R => R =
__DEV__
? // We use this technique to trick minifiers to preserve the function name.
(callRender.react_stack_bottom_frame.bind(callRender): any)
: (null: any);
const callLazyInit = {
react_stack_bottom_frame: function (lazy: LazyComponent<any, any>): any {
const payload = lazy._payload;
const init = lazy._init;
return init(payload);
},
};
export const callLazyInitInDEV: (lazy: LazyComponent<any, any>) => any = __DEV__
? // We use this technique to trick minifiers to preserve the function name.
(callLazyInit.react_stack_bottom_frame.bind(callLazyInit): any)
: (null: any);
Domain
Dependencies
- ReactLazy
Imported By
Source
Frequently Asked Questions
What does ReactFizzCallUserSpace.js do?
ReactFizzCallUserSpace.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does ReactFizzCallUserSpace.js depend on?
ReactFizzCallUserSpace.js imports 1 module(s): ReactLazy.
What files import ReactFizzCallUserSpace.js?
ReactFizzCallUserSpace.js is imported by 1 file(s): ReactFizzServer.js.
Where is ReactFizzCallUserSpace.js in the architecture?
ReactFizzCallUserSpace.js is located at packages/react-server/src/ReactFizzCallUserSpace.js (domain: BabelCompiler, directory: packages/react-server/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free