DEV Community

Discussion on: React Higher-Order Components in TypeScript made simple

Collapse
 
jonaskello profile image
Jonas Kello • Edited

Nice post, just what I was looking for!

I think you can shorten

React.ComponentClass<TOriginalProps & InjectedProps>
| React.StatelessComponent<TOriginalProps & InjectedProps>

into

React.ComponentType<TOriginalProps & InjectedProps>

at least in newer react typings.

Collapse
 
danhomola profile image
Dan Homola

Thank you for the suggestion, I'll look into it :)