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

Function isReactClass

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

Source from the content-addressed store, hash-verified

6export const REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
7
8export function isReactClass(obj: any): obj is ComponentClass<any> {
9 if (!obj) {
10 return false;
11 }
12 if (obj.prototype && (obj.prototype.isReactComponent || obj.prototype instanceof Component)) {
13 return true;
14 }
15 return false;
16}
17
18export function acceptsRef(obj: any): boolean {
19 if (!obj) {

Callers 3

is-react.test.tsxFile · 0.90
isDynamicSetterFunction · 0.90
isReactComponentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…