warnOnInvalidCallback() — react Function Reference
Architecture documentation for the warnOnInvalidCallback() function in ReactFizzClassComponent.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 039d1d7b_9662_ee73_5d9a_e3cff4732a32["warnOnInvalidCallback()"] 8f850c79_0562_f37f_80ff_563c50cd0996["ReactFizzClassComponent.js"] 039d1d7b_9662_ee73_5d9a_e3cff4732a32 -->|defined in| 8f850c79_0562_f37f_80ff_563c50cd0996 style 039d1d7b_9662_ee73_5d9a_e3cff4732a32 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-server/src/ReactFizzClassComponent.js lines 47–63
function warnOnInvalidCallback(callback: mixed) {
if (__DEV__) {
if (callback === null || typeof callback === 'function') {
return;
}
// eslint-disable-next-line react-internal/safe-string-coercion
const key = String(callback);
if (!didWarnOnInvalidCallback.has(key)) {
didWarnOnInvalidCallback.add(key);
console.error(
'Expected the last optional `callback` argument to be a ' +
'function. Instead received: %s.',
callback,
);
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does warnOnInvalidCallback() do?
warnOnInvalidCallback() is a function in the react codebase, defined in packages/react-server/src/ReactFizzClassComponent.js.
Where is warnOnInvalidCallback() defined?
warnOnInvalidCallback() is defined in packages/react-server/src/ReactFizzClassComponent.js at line 47.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free