1
import { ComponentClass } from 'react';
2

3 4
export default function isClassComponent(Component: any): Component is ComponentClass {
4 4
  return Component.prototype && typeof Component.prototype.render === 'function';
5
}

Read our documentation on viewing source code .

Loading