MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / isReactComponent

Function isReactComponent

packages/utils/src/is-react.ts:55–61  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

53}
54
55export function isReactComponent(obj: any): obj is ComponentType<any> {
56 if (!obj) {
57 return false;
58 }
59
60 return Boolean(isReactClass(obj) || typeof obj === 'function' || isForwardRefType(obj) || isMemoType(obj));
61}
62
63export function wrapReactClass(view: FunctionComponent) {
64 let ViewComponentClass = class extends Component {

Callers 9

is-react.test.tsxFile · 0.90
isMixinComponentFunction · 0.90
buildComponentsFunction · 0.90
createIconFunction · 0.90
createContentFunction · 0.90
isCustomViewFunction · 0.90
leafWrapperFunction · 0.50
createActionFunction · 0.50
renderMethod · 0.50

Calls 3

isForwardRefTypeFunction · 0.85
isMemoTypeFunction · 0.85
isReactClassFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…