ReactClientDebugConfigNode.js — react Source File
Architecture documentation for ReactClientDebugConfigNode.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
*/
let hasConfirmedEval = false;
export function checkEvalAvailabilityOnceDev(): void {
if (__DEV__) {
if (!hasConfirmedEval) {
hasConfirmedEval = true;
try {
// eslint-disable-next-line no-eval
(0, eval)('null');
} catch {
console.error(
'eval() is not supported in this environment. ' +
'This can happen if you started the Node.js process with --disallow-code-generation-from-strings, ' +
'or if `eval` was patched by other means. ' +
'React requires eval() in development mode for various debugging features ' +
'like reconstructing callstacks from a different environment.\n' +
'React will never use eval() in production mode',
);
}
}
} else {
// These errors should never make it into a build so we don't need to encode them in codes.json
// eslint-disable-next-line react-internal/prod-error-codes
throw new Error(
'checkEvalAvailabilityOnceDev should never be called in production mode. This is a bug in React.',
);
}
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does ReactClientDebugConfigNode.js do?
ReactClientDebugConfigNode.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 ReactClientDebugConfigNode.js?
ReactClientDebugConfigNode.js defines 1 function(s): checkEvalAvailabilityOnceDev.
Where is ReactClientDebugConfigNode.js in the architecture?
ReactClientDebugConfigNode.js is located at packages/react-client/src/ReactClientDebugConfigNode.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-client/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free