MCPcopy Create free account
hub / github.com/Lobos/react-ui / warnIfInvalidElement

Function warnIfInvalidElement

docs/lib/react.js:5412–5416  ·  view source on GitHub ↗
(Component, element)

Source from the content-addressed store, hash-verified

5410};
5411
5412function warnIfInvalidElement(Component, element) {
5413 if ("development" !== 'production') {
5414 "development" !== 'production' ? warning(element === null || element === false || ReactElement.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
5415 }
5416}
5417
5418/**
5419 * ------------------ The Life-Cycle of a Composite Component ------------------

Callers 1

react.jsFile · 0.85

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…