How can I resolve this typscript error when importing a custom font (e.g. google font).
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
Here the details of the error:
Type 'boolean' is not assignable to type 'string'.ts(2322)
index.d.ts(2279, 9): The expected type comes from property 'crossOrigin' which is declared here on type 'DetailedHTMLProps<LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>'
Fix:
<link ... crossOrigin />
you are writing this is a boolean (expecting a true or false) whereas it takes a string. That is why setting it to crossOrigin="anonymous" would work for exampledid you try to write crossOrigin instead of crossorigin?