checkEvalAvailabilityOnceDev() — react Function Reference
Architecture documentation for the checkEvalAvailabilityOnceDev() function in ReactClientDebugConfigNode.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 56263254_2008_6686_826e_297cec993d9e["checkEvalAvailabilityOnceDev()"] 39807f7d_9971_5264_e080_9d6346ce79db["ReactClientDebugConfigNode.js"] 56263254_2008_6686_826e_297cec993d9e -->|defined in| 39807f7d_9971_5264_e080_9d6346ce79db style 56263254_2008_6686_826e_297cec993d9e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-client/src/ReactClientDebugConfigNode.js lines 11–36
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
Source
Frequently Asked Questions
What does checkEvalAvailabilityOnceDev() do?
checkEvalAvailabilityOnceDev() is a function in the react codebase, defined in packages/react-client/src/ReactClientDebugConfigNode.js.
Where is checkEvalAvailabilityOnceDev() defined?
checkEvalAvailabilityOnceDev() is defined in packages/react-client/src/ReactClientDebugConfigNode.js at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free