checkEvalAvailabilityOnceDev() — react Function Reference
Architecture documentation for the checkEvalAvailabilityOnceDev() function in ReactClientDebugConfigBrowser.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD d5b7bac9_0417_87ca_5130_2fb15f2659fa["checkEvalAvailabilityOnceDev()"] bf697f1b_c678_0add_eb55_93faf6e4002d["ReactClientDebugConfigBrowser.js"] d5b7bac9_0417_87ca_5130_2fb15f2659fa -->|defined in| bf697f1b_c678_0add_eb55_93faf6e4002d style d5b7bac9_0417_87ca_5130_2fb15f2659fa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-client/src/ReactClientDebugConfigBrowser.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. ' +
'If this page was served with a `Content-Security-Policy` header, ' +
'make sure that `unsafe-eval` is included. ' +
'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/ReactClientDebugConfigBrowser.js.
Where is checkEvalAvailabilityOnceDev() defined?
checkEvalAvailabilityOnceDev() is defined in packages/react-client/src/ReactClientDebugConfigBrowser.js at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free