I'm moving a project to TypeScript and I can't use ref :)
The code:
<Info size={ 14 } color="#BDC1C7" ref={ infoIcon } />
The compiler error:
Type error: Type '{ size: number; color: string; ref: MutableRefObject<SVGElement>; }' is not assignable to type 'IntrinsicAttributes & Props & { children?: ReactNode; }'.
Property 'ref' does not exist on type 'IntrinsicAttributes & Props & { children?: ReactNode; }'. Did you mean 'href'?
Not sure what type to use for forwardRef function component, but seems like FC doesn't include any ref property 🤔