flight-modules.js — react Source File
Architecture documentation for flight-modules.js, a javascript file in the react codebase.
Entity Profile
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
*/
// This file is used as temporary storage for modules generated in Flight tests.
let moduleIdx = 0;
const modules: Map<string, Function> = new Map();
// This simulates what the compiler will do when it replaces render functions with server blocks.
export function saveModule(render: Function): string {
const idx = '' + moduleIdx++;
modules.set(idx, render);
return idx;
}
export function readModule(idx: string): Function {
return modules.get(idx);
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does flight-modules.js do?
flight-modules.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 flight-modules.js?
flight-modules.js defines 2 function(s): readModule, saveModule.
Where is flight-modules.js in the architecture?
flight-modules.js is located at packages/react-noop-renderer/flight-modules.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-noop-renderer).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free