I wrote some code:
function renderGreeting(Elem: React.Component) {
return Hello, !;
}
As @Jthorpe alluded to, ComponentClass only allows either Component or PureComponent but not a FunctionComponent.
If you attempt to pass a FunctionComponent, typescript will throw an error similar to...
Type '(props: myProps) => Element' provides no match for the signature 'new (props: myProps, context?: any): Component'.
However, by using ComponentType rather than ComponentClass you allow for both cases. Per the react declaration file the type is defined as...
type ComponentType = ComponentClass
| FunctionComponent