(component: any)
| 15 | * Checks if a given value is a class component. |
| 16 | */ |
| 17 | export const isClassComponent = (component: any): component is React.ComponentClass<any, any> => { |
| 18 | return typeof component === "function" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render); |
| 19 | }; |
| 20 | |
| 21 | /** |
| 22 | * Checks if a given value is a forward ref component. |