You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm moving a project to TypeScript and I can't use ref :)
The code:
<Infosize={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 🤔
The text was updated successfully, but these errors were encountered:
filingroove
changed the title
Ref if working with icons, but is not present on Icon type
Ref is working with icons, but is not present on Icon type
Dec 21, 2020
I'm moving a project to TypeScript and I can't use ref :)
The code:
The compiler error:
Not sure what type to use for
forwardRef
function component, but seems likeFC
doesn't include anyref
property 🤔The text was updated successfully, but these errors were encountered: