this my code
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" content="10.00">{10}</span>
</div>
I get this error.
Type '{ children: string; itemProp: string; content: string; }' is not assignable to type 'DetailedHTMLProps, HTMLSpanElement>'. Property 'content' does not exist on type 'DetailedHTMLProps, HTMLSpanElement>'.
I think the problem is content.
React Typescript - Adding custom attribute
<div itemProp={"offers"} itemScope itemType={"http://schema.org/Offer"}>
<span itemProp="price" {...{content: '10.00'}}>
{10}
</span>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With