I have a generic React component, say like this one:
class Foo extends React.Component, FooState> {
constructor(props: F
You can wrap your component which is created from a HOC into another component. It would look something like this:
class FooWithTd extends React.Component> {
private Container: React.Component & HOCResultType>;
constructor(props:SomeType){
super(props);
this.Container = withTd(Foo);
}
render() {
return ;
}
}
Remember, you probably don't want the HOC inside your render function because it means that the component will be recreated every each render.