I wrote some code:
function renderGreeting(Elem: React.Component) {
return Hello, !;
}
I solved it by making use of Type Assertions before exporting the component. TypeScript wasn't able to identify after composing it using redux 'compose' therefore I divided props types into IParentProps and IProps and use IParentProps while doing Type Assertions
import { compose } from 'react-redux'
import HOC1 from 'HOCs/HOC1'
import HOC2 from 'HOCs/HOC2'
type IParentProps = {}
type IProps = {}
const Component: React.FC = React.memo((props) => {
return
})
return compose(HOC1,HOC2)(Component) as React.FunctionComponent