I am writing my components with a React HOC but it is giving error while using typescript for validating props. the error is as follow
Type '{ type: string; imgUrl: any; vidUrl: any; }' is not assignable to type 'IntrinsicAttributes & Pick & { children?: ReactNode;}'.
what my components look like (example):
type Props = {
type: string;
imgUrl: any;
vidUrl: any;
}
const Component = ({type,imgUrl,vidUrl}:Props)=> (
<div>.....
.....
</div>
)
export defualt withTranslation('common')(Component);