MCPcopy Create free account
hub / github.com/ctrlplusb/react-tree-walker / isClassComponent

Function isClassComponent

src/index.js:73–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71const isReactElement = element => !!getType(element)
72
73const isClassComponent = Comp =>
74 Comp.prototype &&
75 (Comp.prototype.render ||
76 Comp.prototype.isReactComponent ||
77 Comp.prototype.isPureReactComponent)
78
79const isForwardRef = Comp =>
80 Comp.type && Comp.type.$$typeof === forwardRefSymbol

Callers 1

recursiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected